未定义的引用编译时的boost ::系统:: system_category() [英] undefined reference to boost::system::system_category() when compiling
本文介绍了未定义的引用编译时的boost ::系统:: system_category()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图编译在Ubuntu 11.10的程序使用Boost库。我从安装Ubuntu的存储库中的1.46-dev的Boost库,但编译程序时出现错误。
I'm trying to compile a program on Ubuntu 11.10 that uses the Boost libraries. I have the 1.46-dev Boost libraries from the Ubuntu Repository installed, but I get an error when compiling the program.
未定义的引用,以提高::系统:: system_category()
它是什么,我做错了什么?
What is it that I do wrong?
推荐答案
您正在使用Boost库依赖于boost_system库。 (不是所有的人做的。)
The boost library you are using depends on the boost_system library. (Not all of them do.)
假设你使用gcc,尝试添加 -lboost_system
来你的编译器的命令行,以对抗该库链接。
Assuming you use gcc, try adding -lboost_system
to your compiler command line in order to link against that library.
这篇关于未定义的引用编译时的boost ::系统:: system_category()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文