【发布时间】:2013-04-24 09:18:44
【问题描述】:
我使用的是 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
我现在尝试通过转到Properties -> C/C++ Build -> Settings -> MinGW C++ Linker -> Libraries 来在 Eclipse 中链接它:
我在这里输入Library Search Path (-L):C:\MinGW\boost_1_53_0\stage\lib
对于Libraries (-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)
有人知道我做错了什么吗?
感谢您的宝贵时间
【问题讨论】:
标签: c++ eclipse boost linker mingw