简体   繁体   English

无法使用代码块编译Boost

[英]Cannot compile Boost with codeblocks

I've tried to compile this header: 我试图编译此头文件:

# include < boost/test/unit_test.hpp > 

with gcc 4.6.1 but I'm getting following (3) errors: 使用gcc 4.6.1,但出现以下(3)错误:
...\\Libraries\\boost_1_47_0\\boost_1_47_0\\boost\\test\\unit_test_log.hpp|131| ... \\库\\ boost_1_47_0 \\ boost_1_47_0 \\提升\\测试\\ unit_test_log.hpp | 131 | undefined reference to `vtable for boost::unit_test::unit_test_log_t'| 未定义对`vtable的boost :: unit_test :: unit_test_log_t'的引用|
How can I fix it? 我该如何解决?

-lboost_unit_test_framework添加到编译命令行

如果使用UTF单头变体,则不必链接库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM