当前位置:网站首页>CPP (4) boost installation and basic use for Mac
CPP (4) boost installation and basic use for Mac
2020-11-07 20:58:00 【Coxhuang】
List of articles
Boost Installation and use for Mac
#1 Environmental Science
CMake 3.17 C++14 macOS 10.15.5 Clion
#2 Start
Boost stay Mac Installation and use (Clion)
#2.1 download Boost
Address : https://www.boost.org/users/history/version_1_58_0.html
Because I usually use ROS
Why , So use 58 Version of Boost
#2.2 install Boost
- decompression
- Enter the extracted file
cd boost_1_58_0
3. perform
./bootstrap.sh sudo ./b2 install
After a minute or two, the compilation and installation is complete
- The header file :
/usr/local/include/boost
- The library files :
/usr/local/lib
#3 Use
Use here
Clion
Editor
- Use Clion Create a simple project
- modify CMakeList.txt
cmake_minimum_required(VERSION 3.17) project(6_boost_demo) set(CMAKE_CXX_STANDARD 14) set(BOOST_ROOT "/usr/local/include/boost") include_directories(/usr/local/include) # Add header file search path link_directories(/usr/local/lib) # Add library file search path aux_source_directory(. DIR_SRCS) add_executable(6_boost_demo ${DIR_SRCS})
3. main.cpp
#include <iostream> #include <boost/version.hpp> int main() { std::cout << "Hello, World" << std::endl; std::cout << "Boost edition :" << BOOST_VERSION << std::endl; return 0; }
Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .
版权声明
本文为[Coxhuang]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢
See once to understand, graphic single chain table inversion
[C + + learning notes] how about the simple use of the C + + standard library STD:: thread?
Go之发送钉钉和邮箱
[original] the influence of arm platform memory and cache on the real-time performance of xenomai
Let's talk about the locks in the database
The instanceof operator in ecmascript7 specification
How to learn technology efficiently
团灭 LeetCode 股票买卖问题
状态压缩:对动态规划进行降维打击
工作1-3年的程序员,应该具备怎么样的技术能力?该如何提升?
随机推荐
Animation techniques and details you may not know
When tidb and Flink are combined: efficient and easy to use real-time data warehouse
编程界大佬教你:一行Python代码能做出哪些神奇的事情?
三步一坑五步一雷,高速成长下的技术团队怎么带?
Improvement of maintenance mode of laravel8 update
一次公交卡被“盗刷”事件带来的思考
使用 Xunit.DependencyInjection 改造测试项目
盘点那些争议最大的编程观点,你是什么看法呢?
[original] the influence of arm platform memory and cache on the real-time performance of xenomai
ngnix集群高并发
WPF 关于绘图个人总结
C language I blog assignment 03
Recommend suicide, openai warns: gpt-3 is too risky for medical purposes
Count the frequency of letters in text (case insensitive)
supervisor和Python多进程multiprocessing使用 子进程残留问题
来自不同行业领域的50多个对象检测数据集
云计算之路-出海记:整一台 aws 免费云服务器
分享几个我日常使用的VS Code插件
static+代码块+多态+异常
Got timeout reading communication packets解决方法