在linux環境下編譯boost & asio庫,是個頭疼的事情,前天搞了一天也沒把asio.examples編譯通。
無奈,只有重新下載獨立的asio_1.4.8.zip單獨編譯。
1.unzip
2.make
wait some seconde....
搞定!
編譯asio Example:echo
g++ -g -o bclient -I/home/myuser/asio/asio-1.4.8/include -lpthread blocking_tcp_echo_client.cpp
開啓server,
運行:./bclient 127.0.0.1 5000
entermessage:aaaa
reply:aaaa