【发布时间】:2013-04-29 21:17:23
【问题描述】:
我在http://nuwen.net/mingw.html使用了MinGW安装
我运行了在以下位置找到的 second.cpp 测试: http://tabreziqbal.wordpress.com/2006/03/16/how-to-test-c-boost-installation/ (我使用了正确的命令从 cmets 运行,这是 g++ -o second second.cpp -lboost_filesystem)
我收到以下错误:
C:\Users\user\Projects\Programming\C++\boostTest2>g++ -o second second.cpp -lboost_filesystem
C:\Users\user\AppData\Local\Temp\ccDlbKGy.o:second.cpp:(.text+0x102): 未定义对boost::system::generic_cat
egory()'
C:\Users\user\AppData\Local\Temp\ccDlbKGy.o:second.cpp:(.text+0x10c): undefined reference toboost::system::generic_cat 的引用
神话()'
C:\Users\user\AppData\Local\Temp\ccDlbKGy.o:second.cpp:(.text+0x116): 未定义引用boost::system::system_cate
gory()'
C:\MinGW\bin/ld.exe: C:\Users\user\AppData\Local\Temp\ccDlbKGy.o: bad reloc address 0xe in section.text$_ZN5boost6syst
em14error_categoryD1Ev[__ZN5boost6system14error_categoryD1Ev]'
C:\MinGW\bin/ld.exe:最终链接失败:无效操作
collect2.exe:错误:ld 返回 1 个退出状态
我知道我发现了 boost 的安装测试功能 http://gcc.gnu.org/testing/testing-boost.html 但这些文件不包含在 nuwen.net 的发行版中(所以我必须自己做)。
感谢您的帮助 - 我想我只是搞砸了一些小事(无论如何我希望如此)。
谢谢大家!
【问题讨论】: