【发布时间】:2014-01-09 03:20:21
【问题描述】:
我正在尝试与 boost 链接,在 ubuntu 下使用 clang。我收到以下错误:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libboost_filesystem.a(operations.o): undefined reference to symbol '_ZNSs4_Rep10_M_destroyERKSaIcE@@GLIBCXX_3.4'
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: error adding symbols: DSO missing from command line
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我已将 find_package(Boost COMPONENTS file_system, system) 添加到 cmake。知道什么可能导致此错误吗?
【问题讨论】:
-
我已经检查了 cmake 生成的构建命令,并且链接在对象之后。