【发布时间】:2015-01-21 12:16:24
【问题描述】:
我已经下载并构建了 boost 库
bootstrap mingw
和
b2 toolset=gcc
这些库是在
中创建的C:\Boost\boost_1_57_0\stage\lib
在 Eclipse 中我已将此目录添加为库路径
并添加库libboost_thread-mgw49-mt-1_57,最后带有和不带有.a。
g++ 行看起来像
g++ "-LC:\\Boost\\boost_1_57_0\\stage\\lib" -o MyThread.exe main.o MyThread.o -llibboost_thread-mgw49-mt-1_57
我收到错误消息
ld.exe: cannot find -llibboost_thread-mgw49-mt-1_57 collect2.exe: error: ld returned 1 exit status
如果我添加.a,它会按预期附加到错误消息中。
我做错了什么?
【问题讨论】: