旧项目编译的未定义参考

时间:2017-03-27 09:11:48

标签: c++ compilation sfml undefined-reference

编译旧项目时遇到了一些麻烦。 我已经成功地解决了一些失败,但仍有一些失败。

./lib/libgdl_gl-2012.4/lib/libgdl_gl.so: undefined reference to `sf::Unicode::Text::Text(std::string const&)'

//usr/local/lib/libsfml-graphics.so.1.6: undefined reference to `sf::Unicode::Text::operator std::basic_string<unsigned int, std::char_traits<unsigned int>, std::allocator<unsigned int> > const&() const'
collect2: error: ld returned 1 exit status

我正在使用这些标志:-I ./lib/libgdl_gl-2012.4/include -L ./lib/libgdl_gl-2012.4/lib -lpthread -Wl,--rpath=./lib/libgdl_gl-2012.4/lib -lsfml-audio -lsfml-graphics -lsfml-system -lgdl_gl -lGL -lGLU -Wall -W -Werror -D_GLIBCXX_USE_CXX11_ABI=0

帮助?

1 个答案:

答案 0 :(得分:0)

我发现了我的问题,它是libsfml。 我所拥有的那个没有正确编译。

它现在正在工作;)