我正在使用Windows 7 64x,并已安装MinGW。
我的目标是在Eclipse上使用boost库(这里是 boost_program_options
)。
boost库已正确安装,我可以在 C:\MinGW\boost_1_53_0\stage\lib
下看到文件 libboost_program_options-vc90-mt-gd-1_53.lib
。
现在我尝试通过进入 属性 -> C/C++构建 -> 设置 -> MinGW C++链接器 -> 库
来在Eclipse中链接它:
这里我输入 库搜索路径
(-L
): C:\MinGW\boost_1_53_0\stage\lib
并为 库
(-l
) 输入: boost_program_options-vc90-mt-gd-1_53
尝试构建时,我收到以下错误信息:
11:06:54 **** Build of configuration Debug for project AP ****
make all
Building file: ../src/HW1EX1.cpp
Invoking: GCC C++ Compiler
g++ -I"C:\MinGW\boost_1_53_0" -I"C:\MinGW\boost_1_53_0\boost\program_options" -I"C:\MinGW\boost_1_53_0\boost" -I"C:\MinGW\boost_1_53_0\boost\program_options\detail" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/HW1EX1.d" -MT"src/HW1EX1.d" -o "src/HW1EX1.o" "../src/HW1EX1.cpp"
Finished building: ../src/HW1EX1.cpp
Building target: AP.exe
Invoking: MinGW C++ Linker
g++ -LC:\MinGW\boost_1_53_0\stage\lib -static-libgcc -o "AP.exe" ./src/HW1EX1.o -lboost_program_options-vc90-mt-gd-1_53
c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot find -lboost_program_options-vc90-mt-gd-1_53
collect2: ld returned 1 exit status
make: *** [AP.exe] Error 1
11:06:57 Build Finished (took 3s.80ms)
有人知道我可能做错了什么吗?
感谢您的时间。