第一部分:安装boost
1,更新
sudo apt-get update
2,寻找
sudo apt search boost
libboost-all-dev/bionic 1.65.1.0ubuntu1 amd64
Boost C++ Libraries development files (ALL) (default version)
3,安装
sudo apt-get install libboost-all-dev
参考:
[在Ubuntu上安装Boost的五种方法(全网最全,建议收藏)](%E7%AC%AC%E4%B8%80%E9%83%A8%E5%88%86%EF%BC%9A%E5%AE%89%E8%A3%85boost%20%201%EF%BC%8C%E6%9B%B4%E6%96%B0%20sudo%20apt-get%20update%20%202%EF%BC%8C%E5%AF%BB%E6%89%BE%20sudo%20apt%20search%20boost%20%20libboost-all-dev/bionic%201.65.1.0ubuntu1%20amd64%20%20%20Boost%20C++%20Libraries%20development%20files%20%28ALL%29%20%28default%20version%29%20%09%203%EF%BC%8C%E5%AE%89%E8%A3%85%09%20sudo%20apt-get%20install%20libboost-all-dev%20%20%20%E5%8F%82%E8%80%83%EF%BC%9A%20%E5%9C%A8Ubuntu%E4%B8%8A%E5%AE%89%E8%A3%85Boost%E7%9A%84%E4%BA%94%E7%A7%8D%E6%96%B9%E6%B3%95%28%E5%85%A8%E7%BD%91%E6%9C%80%E5%85%A8%EF%BC%8C%E5%BB%BA%E8%AE%AE%E6%94%B6%E8%97%8F%29%20https://blog.csdn.net/qq_41854911/article/details/119454212?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-1-119454212-blog-117422672.pc_relevant_vip_default&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2~default~BlogCommendFromBaidu~Rate-1-119454212-blog-117422672.pc_relevant_vip_default&utm_relevant_index=2%20%20%20******************************************************************************************************%20******************************************************************************************************%20******************************************************************************************************%20%20%20%E7%AC%AC%E4%BA%8C%E9%83%A8%E5%88%86%EF%BC%9Awebsocketpp%E7%BC%96%E8%AF%91%E9%AA%8C%E8%AF%81%201%EF%BC%8C%E6%BA%90%E7%A0%81%E4%B8%8B%E8%BD%BD%20https://github.com/zaphoyd/websocketpp%20%202%EF%BC%8C%E8%A7%A3%E5%8E%8B%E8%BF%9B%E5%85%A5%E7%9B%AE%E5%BD%95%20cd%20/mnt/hgfs/share/02-pipelines/design/modules/MyWebsocket/websocketpp-master/websocketpp-master%20%203%EF%BC%8C%E7%BC%96%E8%AF%91%E7%9B%AE%E5%BD%95%20mkdir%20build%20%204%EF%BC%8C%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85%28%E7%BC%BA%E5%B0%91%E5%BA%93%E5%8F%82%E8%80%83%E7%AC%AC%E4%B8%80%E9%83%A8%E5%88%86%29%20cmake%20..%20make%20%205%EF%BC%8C%E5%AE%A2%E6%88%B7%E7%AB%AF%E9%AA%8C%E8%AF%81%EF%BC%88%E5%9C%B0%E5%9D%80%EF%BC%9A%22ws://192.168.199.130:9002%22%EF%BC%89%20D:%5C26-pipeline%5C11-websocket%E7%BD%91%E9%A1%B5%5Ccar-debug.html%20%20%20%E5%8F%82%E8%80%83%EF%BC%9A%20websocketpp%E5%BA%93%E7%BC%96%E8%AF%91%E7%9A%84%E5%BF%83%E8%B7%AF%E5%8E%86%E7%A8%8B%20https://blog.csdn.net/qq_35440678/article/details/83239798)
******************************************************************************************************
******************************************************************************************************
******************************************************************************************************
第二部分:websocketpp编译验证
1,源码下载
https://github.com/zaphoyd/websocketpp
2,解压进入目录
cd /mnt/hgfs/share/02-pipelines/design/modules/MyWebsocket/websocketpp-master/websocketpp-master
3,编译目录
mkdir build
4,编译安装(缺少库参考第一部分)
cmake ..
make
5,客户端验证(地址:"ws://192.168.199.130:9002")
D:\26-pipeline\11-websocket网页\car-debug.html
参考:
websocketpp库编译的心路历程
https://blog.csdn.net/qq_35440678/article/details/83239798
安装 boost + websocketpp
于 2022-11-15 16:43:39 首次发布