2014-05-06 3 views
0

Я пытаюсь скомпилировать библиотеку SFGUI - это графический интерфейс для SFML. Я выполнял следующие инструкции: http://sfgui.sfml-dev.de/p/docs/guide/installing.Проблемы с компиляцией SFGUI/C++. Ошибка 2019: неразрешенный внешний символ

Во-первых, я использовал CMake для генерации Makefile - я создал генератор, как NMake Makefiles, затем Visual Studio 2012. Затем я попытался скомпилировать его с помощью NMake и Visual Studio 2013. Оба сгенерировали те же ошибки, которые показаны ниже.

Error 1 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::begin(void)const " ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) referenced in function "public: class sf::Vector2<float> __thiscall sfg::Engine::GetTextMetricsA(class sf::String const &,class sf::Font const &,unsigned int)const " ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) C:\Program Files (x86)\CMake 2.8\bin\Engine.obj sfgui 
Error 2 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::begin(void)const " ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) C:\Program Files (x86)\CMake 2.8\bin\Renderer.obj sfgui 
Error 3 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::begin(void)const " ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) C:\Program Files (x86)\CMake 2.8\bin\Window.cpp.obj sfgui 
Error 4 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::begin(void)const " ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) C:\Program Files (x86)\CMake 2.8\bin\Entry.cpp.obj sfgui 
Error 5 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::end(void)const " ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) referenced in function "public: class sf::Vector2<float> __thiscall sfg::Engine::GetTextMetricsA(class sf::String const &,class sf::Font const &,unsigned int)const " ([email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]@[email protected]) C:\Program Files (x86)\CMake 2.8\bin\Engine.obj sfgui 
Error 6 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::end(void)const " ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) C:\Program Files (x86)\CMake 2.8\bin\Renderer.obj sfgui 
Error 7 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::end(void)const " ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) C:\Program Files (x86)\CMake 2.8\bin\Window.cpp.obj sfgui 
Error 8 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::_String_const_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::end(void)const " ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) C:\Program Files (x86)\CMake 2.8\bin\Entry.cpp.obj sfgui 
Error 9 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::begin(void)" ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) referenced in function "private: unsigned int __thiscall sfg::Entry::GetPositionFromMouseX(int)" ([email protected]@[email protected]@[email protected]) C:\Program Files (x86)\CMake 2.8\bin\Entry.cpp.obj sfgui 
Error 10 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::_String_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::begin(void)" ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) C:\Program Files (x86)\CMake 2.8\bin\Label.cpp.obj sfgui 
Error 11 error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::_String_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::end(void)" ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) referenced in function "private: unsigned int __thiscall sfg::Entry::GetPositionFromMouseX(int)" ([email protected]@[email protected]@[email protected]) C:\Program Files (x86)\CMake 2.8\bin\Entry.cpp.obj sfgui 
Error 12 error LNK2001: unresolved external symbol "__declspec(dllimport) public: class std::_String_iterator<class std::_String_val<struct std::_Simple_types<unsigned int> > > __thiscall sf::String::end(void)" ([email protected]@[email protected]@[email protected][email protected][email protected]@[email protected]@@[email protected]@@[email protected]@XZ) C:\Program Files (x86)\CMake 2.8\bin\Label.cpp.obj sfgui 
Error 13 error LNK1120: 4 unresolved externals C:\Program Files (x86)\CMake 2.8\bin\Debug\sfgui-d.dll sfgui 

Знаете ли вы, как исправить это? Я искал ответ в Интернете, но мне это не помогло. Это библиотека, а не мой проект, поэтому я не должен менять код.

+0

Я просто люблю сообщения об ошибках компоновщика - суть ясности и удобочитаемости. –

ответ

0

sf::String Этого класс не предусмотрен SFGUI самих, а тем, что основной кросс-платформенной библиотека SFML. Похоже, что его библиотеки не были включены в сборку правильно.

Убедитесь SFML найден правильно во время бега CMake, проверьте его .lib двоичные файлы были произведены в нужном месте (а не только включает в себя), посмотрите, если эти библиотеки указываются при запуске link.exe на выходе nmake VERBOSE=1 и т. д. Также перепроверьте, что SFML сделал правильную сборку раньше, проверьте возможный шаг установки и т. д.

Смежные вопросы