编译boost
- ./bootstrap.sh --prefix=/root/lib/boost --with-libraries=system,date_time,random
- 修改 project-config.jam 如下:
... if ! gcc in [ feature.values <toolset> ] { using gcc : arm : /usr/local/gcc-linaro-aarch64-linux-gnu-4.8/bin/aarch64-linux-gnu-gcc ; }
3. ./b2
4. ./b2 install
编译socketio
下载代码
- 下载socketio:https://github.com/socketio/socket.io-client-cpp
- 下载websocket:https://github.com/zaphoyd/websocketpp/tree/0.8.2 放到./lib/websocketpp目录下
- 下载rapidjson:https://github.com/Tencent/rapidjson/ 放到./lib/rapidjson目录下
编译:
- 修改CMakeLists.txt:
SET(CMAKE_C_COMPILER /usr/local/gcc-linaro-aarch64-linux-gnu-4.8/bin/aarch64-linux-gnu-gcc) SET(CMAKE_CXX_COMPILER /usr/local/gcc-linaro-aarch64-linux-gnu-4.8/bin/aarch64-linux-gnu-g++) add_definitions(-std=c++11)
- 编译openssl,cmake设置OPENSSL_ROOT_DIR(库路径),OPENSSL_INCLUDE_DIR(头文件路径)
- 编译:
- cmake -DBOOST_ROOT:STRING=/root/lib/boost -DOPENSSL_ROOT_DIR=/root/lib/openssl/lib -DOPENSSL_INCLUDE_DIR=/root/lib/openssl/include ./
-
make
- make install