目标:
能够在c2终端下 运行:
boost_1_41_0/libs/asio/example/echo中的:
async_tcp_echo_server
async_tcp_echo_client
步骤:
1. 下载 1.41.0
2. tar 到 交叉编译环境下
3.
cd /export/byh/boost/boost_1_41_0
执行 ./bootstrap.sh
4.
modify “
user-config.jam”:
using gcc : c2 : c2-linux-g++ ;
bjam toolset=gcc-c2
5.
./bjam install
6.
cd libs/asio/example/
find ../../../bin.v2/ -name "*.a*"
../../../bin.v2/libs/signals/build/gcc-c2/release/link-static/threading-multi/libboost_signals.a
../../../bin.v2/libs/system/build/gcc-c2/release/link-static/threading-multi/libboost_system.a
../../../bin.v2/libs/math/build/gcc-c2/release/link-static/threading-multi/libboost_math_tr1.a
../../../bin.v2/libs/math/build/gcc-c2/release/link-static/threading-multi/libboost_math_c99.a
../../../bin.v2/libs/math/build/gcc-c2/release/link-static/threading-multi/libboost_math_tr1f.a
../../../bin.v2/libs/test/build/gcc-c2/release/link-static/threading-multi/libboost_unit_test_framework.a
../../../bin.v2/libs/test/build/gcc-c2/release/link-static/threading-multi/libboost_prg_exec_monitor.a
../../../bin.v2/libs/test/build/gcc-c2/release/link-static/threading-multi/libboost_test_exec_monitor.a
../../../bin.v2/libs/filesystem/build/gcc-c2/release/link-static/threading-multi/libboost_filesystem.a
../../../bin.v2/libs/wave/build/gcc-c2/release/link-static/threading-multi/libboost_wave.a
../../../bin.v2/libs/python/build/gcc-c2/release/link-static/threading-multi/libboost_python.a
../../../bin.v2/libs/thread/build/gcc-c2/release/link-static/threading-multi/libboost_thread.a
../../../bin.v2/libs/regex/build/gcc-c2/release/link-static/threading-multi/libboost_regex.a
../../../bin.v2/libs/date_time/build/gcc-c2/release/link-static/threading-multi/libboost_date_time.a
../../../bin.v2/libs/serialization/build/gcc-c2/release/link-static/threading-multi/libboost_wserialization.a
../../../bin.v2/libs/serialization/build/gcc-c2/release/link-static/threading-multi/libboost_serialization.a
../../../bin.v2/libs/program_options/build/gcc-c2/release/link-static/threading-multi/libboost_program_options.a
../../../bin.v2/libs/graph/build/gcc-c2/release/link-static/threading-multi/libboost_graph.a
7.
c2-linux-g++ async_tcp_echo_server.cpp -I../../../../ -o async_tcp_echo_server -L../../../../bin.v2/libs/asio/build/gcc-c2/release/link-static/threading-multi/ -L../../../../bin.v2/libs/serialization/build/gcc-c2/release/link-static/threading-multi/ -lboost_serialization -lboost_serialization -lpthread -L../../../../bin.v2/libs/system/build/gcc-c2/release/link-static/threading-multi/ -lboost_system
c2-linux-g++ blocking_tcp_echo_client.cpp -I../../../../ -o blocking_tcp_echo_client
-L../../../../bin.v2/libs/asio/build/gcc-c2/release/link-static/threading-multi/
-L../../../../bin.v2/libs/serialization/build/gcc-c2/release/link-static/threading-multi/
-lboost_serialization -lboost_serialization -lpthread
-L../../../../bin.v2/libs/system/build/gcc-c2/release/link-static/threading-multi/
-lboost_system
c2-linux-g++ blocking_tcp_echo_server.cpp -I../../../../ -o /export/bin/ice/blocking_tcp_echo_server -L../../../../bin.v2/libs/asio/build/gcc-c2/release/link-static/threading-multi/ -L../../../../bin.v2/libs/serialization/build/gcc-c2/release/link-static/threading-multi/ -lboost_serialization -lboost_serialization -lpthread -L../../../../bin.v2/libs/system/build/gcc-c2/release/link-static/threading-multi/ -lboost_system ../../../../bin.v2/libs/thread/build/gcc-c2/release/link-static/threading-multi/libboost_thread.a getncpus.cpp
c2-linux-g++ -I../../../../ posix_chat_client.cpp getncpus.cpp -L../../../../bin.v2/libs/asio/build/gcc-c2/release/link-static/threading-multi/ -L../../../../bin.v2/libs/serialization/build/gcc-c2/release/link-static/threading-multi/ -lboost_serialization -lboost_serialization -lpthread -L../../../../bin.v2/libs/system/build/gcc-
c2/release/link-static/threading-multi/ -lboost_system ../../../../bin.v2/libs/thread/build/gcc-c2/release/link-static/threading-multi/libboost_thread.a -o /export/bin/ice/posix_chat_client
//filetransfer 测试
"C:\Program Files\boost\boost_1_41_0\libs\asio\example\echo\AsyncechoServer\Debug\FileTransferClient.exe" 172.168.0.231 67 "E:\SourceHome\3rdparty\ice\LR9Download.exe" e:/1.rar