【发布时间】:2017-08-19 22:02:03
【问题描述】:
我在编译一个旧项目时遇到了一些麻烦。 我已经成功解决了一些失败,但仍有一些失败。
./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
帮助?
【问题讨论】:
-
无论
gdl_gl是什么,它似乎链接到不同版本的sfml-system,这也可能导致关于sfml-graphics的后续错误。 -
我已经探索过这种方式,但该项目需要 sfml 1.6,它解决了我的大部分错误,除了最后两个错误,所以我使用了正确版本的 sfml。
标签: c++ compilation sfml undefined-reference