旧项目编译的未定义引用

Undefined reference on old project compilation

本文关键字:未定义 引用 编译 项目      更新时间:2023-10-16

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

./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

帮助?

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

它现在正在工作;)