/tmp/ccZNcoNu.o: In function
__static_initialization_and_destruction_0(int, int)': xxx.cpp:(.text+0x1f1): undefined reference toboost::system::generic_category()’ xxx.cpp:(.text+0x1fd):
undefined reference toboost::system::generic_category()' xxx.cpp:(.text+0x209): undefined reference toboost::system::system_category()’
- 编译后面加上 -lboost_xxx xxx是boost后面的库名
例如:g++ test.cpp -o test -lboost_system
博客主要讲述了C++编译时遇到的问题,在编译过程中出现了对boost::system::system_category()未定义引用的错误。解决办法是在编译命令后面加上 -lboost_xxx,其中xxx是boost后面的库名,还给出了示例g++ test.cpp -o test -lboost_system。

484

被折叠的 条评论
为什么被折叠?



