无法使用codeblocks编译Boost

时间:2011-10-17 16:01:02

标签: c++ testing boost

我试图编译这个标题:

# include < boost/test/unit_test.hpp > 

使用gcc 4.6.1但我遇到以下(3)错误:
... \ Libraries \ boost_1_47_0 \ boost_1_47_0 \ boost \ test \ unit_test_log.hpp | 131 | 未定义引用`vtable for boost :: unit_test :: unit_test_log_t'|
我该如何解决?

2 个答案:

答案 0 :(得分:2)

-lboost_unit_test_framework添加到编译命令行

答案 1 :(得分:2)

如果您使用single-header variant of UTF,则无需链接库。