【问题标题】:Undefined reference on old project compilation旧项目编译的未定义引用
【发布时间】: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


【解决方案1】:

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

现在可以使用了;)

【讨论】:

    猜你喜欢
    • 2017-11-03
    • 1970-01-01
    • 2010-12-05
    • 1970-01-01
    • 2013-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-20
    相关资源
    最近更新 更多