这是一个链接错误,不是编译错误。需要在链接时候指定依赖boost_system库。
在集成编译环境中设置链接库或者命令行增加-l选项。
g++ main.cpp -o main -lboost_system
参考http://stackoverflow.com/questions/9723793/undefined-reference-to-boostsystemsystem-category-when-compiling
本文介绍了解决在编译过程中遇到的Boost系统库链接错误的方法。通过在集成开发环境中正确配置链接库或在命令行中使用-l选项指定依赖库,可以有效避免出现未定义引用错误。
这是一个链接错误,不是编译错误。需要在链接时候指定依赖boost_system库。
在集成编译环境中设置链接库或者命令行增加-l选项。
g++ main.cpp -o main -lboost_system
参考http://stackoverflow.com/questions/9723793/undefined-reference-to-boostsystemsystem-category-when-compiling
3736
1万+