Linking Boost Library in Linux

ε祈祈猫儿з 提交于 2019-11-30 02:54:43
jameszhao00

Change -llibboost_system to -lboost_system.

In linux, the "lib" prefix in front of a library is not used when referencing said library.

tgoodhart

In this case james' answer was correct, but if anybody else happens to stumble upon this post like I did then be aware that you can get this message if you link old boost headers against newer libraries. get_system_category() specifically has been deprecated. I ran into this problem while accidentally including distro-provided headers but linking against my own internal copy of boost.

Gerhard Stein

If you still get problems you might want to include posix-threads by adding to the linker flags:

-lpthread
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!