在函数`__static_initialization_and_destruction_0(int,int)'中

时间:2015-12-08 11:52:56

标签: c++ boost makefile ubuntu-14.04

嗨我之前正在使用 make 命令编译我的程序,因为我的程序包含多个头文件。由于我添加了 BOOST LIBRARIES ,我无法使用相同的命令进行编译并收到以下错误。

In function `__static_initialization_and_destruction_0(int, int)':
main.cpp:(.text+0x4746): undefined reference to`boost::system::generic_category()'
main.cpp:(.text+0x4752): undefined reference to `boost::system::generic_category()'
main.cpp:(.text+0x475e): undefined reference to `boost::system::system_category()'
CMakeFiles/WebcamFaceRec.dir/main.cpp.o: In function `boost::system::error_code::error_code()':
main.cpp:(.text._ZN5boost6system10error_codeC2Ev[_ZN5boost6system10error_codeC5Ev]+0x17    ): undefined reference to `boost::system::system_category()'
CMakeFiles/WebcamFaceRec.dir/main.cpp.o: In function `boost::asio::error::get_system_category()':
main.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv[_ZN5boost4asio5error19get_system_categoryEv]+0x5): undefined reference to `boost::system::system_category()'
collect2: error: ld returned 1 exit status
make[2]: *** [WebcamFaceRec] Error 1
make[1]: *** [CMakeFiles/WebcamFaceRec.dir/all] Error 2
make: *** [all] Error 2

我搜索了链接:g++ compile error,但没有帮助。 有人可以指出我正确的链接,甚至小帮助将不胜感激。

0 个答案:

没有答案