当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢
三步一坑五步一雷,高速成长下的技术团队怎么带?
Do not understand the underlying principle of database index? That's because you don't have a B tree in your heart
一次公交卡被“盗刷”事件带来的思考
【解决方案】分布式定时任务解决方案
Animation techniques and details you may not know
use Xunit.DependencyInjection Transformation test project
On the coverage technology and best practice of go code
What magic things can a line of Python code do?
状态压缩:对动态规划进行降维打击
Principles of websocket + probuf
随机推荐
Stack bracket matching
sed之查找替换
delphi10的rest.json与system.json的踩坑
Deep into web workers (1)
What magic things can a line of Python code do?
How to think in the way of computer
栈-括号的匹配
年薪90万程序员不如月入3800公务员?安稳与高收入,到底如何选择?
Supervisor process management installation and use
Web Security (4) -- XSS attack
How to deal with data leakage and deletion related to business life and death?
Get started, GIT
使用 Xunit.DependencyInjection 改造测试项目
微服务的出现和意义的探索
看一遍就理解,图解单链表反转
Ubuntu下搜狗输入法的下载安装及配置
C language I blog assignment 03
汇编函数mcall systemstack asmcgocall syscall
awk实现类sql的join操作
How to choose a good company