问题描述
- linux下eclipse使用boost asio进行网络开发
-
我按照官方文档编译了boost库并安装,然后我的eclipse工程下的/usr/local/include底下已经有了boost接着我编译官网上的例子:
#include
#include
#includeusing namespace std;
using namespace boost;int main()
{
boost::asio::io_service io;
boost::asio::deadline_timer t(io, boost::posix_time::seconds(5));
t.wait();std::cout << "Hello, world!" << std::endl;
return 0;
}编译后,报错:
TimerTest.cpp:(.text+0x2f): undefined reference toboost::system::generic_category()'
boost::system::generic_category()'
TimerTest.cpp:(.text+0x39): undefined reference to
TimerTest.cpp:(.text+0x43): undefined reference toboost::system::system_category()'
boost::system::system_category()'
TimerTest.cpp:(.text+0x4d): undefined reference to请问,这是怎么回事?哪位大神帮帮我,在线等,急
解决方案
http://blog.csdn.net/majianfei1023/article/details/46761029
时间: 2024-10-09 18:00:30