当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- On hiz buffer
- 【解决方案】分布式定时任务解决方案
- supervisor和Python多进程multiprocessing使用 子进程残留问题
- 盘点那些争议最大的编程观点,你是什么看法呢?
- 面部识别:攻击类型和反欺骗技术
- How did I lose control of the team?
- Adobe Lightroom / LR 2021 software installation package (with installation tutorial)
- Data transmission of asynchronous serial communication controlled by group bus communication
- Code Review Best Practices
- Cpp(二) 创建Cpp工程
猜你喜欢
On the coverage technology and best practice of go code
【C++学习笔记】C++ 标准库 std::thread 的简单使用,一文搞定还不简单?
Three steps, one pit, five steps and one thunder, how to lead the technical team under the rapid growth?
Count the frequency of letters in text (case insensitive)
Go之发送钉钉和邮箱
Improvement of maintenance mode of laravel8 update
Principles of websocket + probuf
Kubernetes服务类型浅析:从概念到实践
来自不同行业领域的50多个对象检测数据集
Don't treat exceptions as business logic, which you can't afford
随机推荐
awk实现类sql的join操作
Thinkphp6中where条件中字段与字段比较条件的写法
关于update操作并发问题
Ac86u KX Online
Big data algorithm - bloon filter
When tidb and Flink are combined: efficient and easy to use real-time data warehouse
How to deal with data leakage and deletion related to business life and death?
The instanceof operator in ecmascript7 specification
来自不同行业领域的50多个对象检测数据集
Kylin on kubernetes' practice on eBay
密码学-尚硅谷
动态规划——用二进制表示集合的状态压缩DP
On the concurrency of update operation
There's not much time left for Kwai Chung.
Got timeout reading communication packets解决方法
Cpp(四) Boost安装及基本使用 for Mac
Code Review最佳实践
三步一坑五步一雷,高速成长下的技术团队怎么带?
A detailed explanation of microservice architecture
Principles of websocket + probuf