当前位置:网站首页>CPP (2) creating CPP project
CPP (2) creating CPP project
2020-11-07 20:58:00 【Coxhuang】
List of articles
- first Cpp Example
- #1 Environmental Science
- #2 summary
- #3 Start
- #3.1 Method 1 :Clion
- #3.2 Method 2 : Manually create
first Cpp Example
#1 Environmental Science
macOS 10.15.5
#2 summary
This article creates a simple Cpp engineering , Compare the similarities and differences between the two methods , The purpose of each document is not explained here , Just two kinds of creation Cpp The method of Engineering
#3 Start
GitHub Example :https://github.com/Coxhuang/FKCpp/tree/master/1.first_demo
#3.1 Method 1 :Clion
- New project
- function main.cpp
#3.2 Method 2 : Manually create
- Create the following file :
build CMakeLists.txt main.cpp
among :
- build: Empty folder
- CMakeLists.txt The contents are as follows :
cmake_minimum_required(VERSION 3.16) project(demo) set(CMAKE_CXX_STANDARD 11) add_executable(demo_exe main.cpp)
- main.cpp The contents are as follows :
// // Created by Cox on 2020/8/30. // #include <iostream> int main() { std::cout << "Hello, World!" << std::endl; return 0; }
2. cmake
- Use terminal Get into built Under the table of contents
cmake ..
3. make compile
- stay built Under the table of contents
make
4. function
- stay built Under the table of contents , Run the executable
./demo_exe
Participation of this paper Tencent cloud media sharing plan , You are welcome to join us , share .
版权声明
本文为[Coxhuang]所创,转载请带上原文链接,感谢
边栏推荐
- How Facebook open source framework simplifies pytorch experiment
- Insight -- the application of sanet in arbitrary style transfer
- 年薪90万程序员不如月入3800公务员?安稳与高收入,到底如何选择?
- Search and replace of sed
- High concurrency in ngnix cluster
- The most hard core of the whole network explains the computer startup process
- It's time to end bertology
- Kubernetes服务类型浅析:从概念到实践
- 屏读时代,我们患上了注意力缺失候群症
- Implementation of Caesar cipher
猜你喜欢
云计算之路-出海记:整一台 aws 免费云服务器
More than 50 object detection datasets from different industries
来自不同行业领域的50多个对象检测数据集
Got timeout reading communication packets解决方法
Insight -- the application of sanet in arbitrary style transfer
获取树形菜单列表
What magic things can a line of Python code do?
30岁后,你还剩下什么?
What kind of technical ability should a programmer who has worked for 1-3 years? How to improve?
洞察——风格注意力网络(SANet)在任意风格迁移中的应用
随机推荐
一万四千字分布式事务原理解析,全部掌握你还怕面试被问?
Getting started with go wire dependency injection
On hiz buffer
sed之查找替换
How to learn technology efficiently
30岁后,你还剩下什么?
数据库基本操作
Web Security (3) -- CSRF attack
Search and replace of sed
Principles of websocket + probuf
微服务的出现和意义的探索
来自不同行业领域的50多个对象检测数据集
Data transmission of asynchronous serial communication controlled by group bus communication
如何应对事关业务生死的数据泄露和删改?
Share several vs Code plug-ins I use everyday
一次公交卡被“盗刷”事件带来的思考
The prediction accuracy of the model is as high as 94%! Using machine learning to solve the 200 billion dollar inventory problem perfectly
Cpp(一) 安装CMake
Git code submission operation, and git push prompt failed to push some refs'xxx '
When tidb and Flink are combined: efficient and easy to use real-time data warehouse