当前位置:网站首页>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 to deal with data leakage and deletion related to business life and death?
- GrowingIO 响应式编程探索和实践
- Recommend suicide, openai warns: gpt-3 is too risky for medical purposes
- Web Security (3) -- CSRF attack
- Ubuntu下搜狗输入法的下载安装及配置
- Big data algorithm - bloon filter
- 动态规划——用二进制表示集合的状态压缩DP
- Annual salary of 900000 programmers is not as good as 3800 civil servants a month? How to choose between stability and high income?
- 统计文本中字母的频次(不区分大小写)
- Web安全(一)---浏览器同源策略
猜你喜欢
How to choose a good company
【解决方案】分布式定时任务解决方案
你可能不知道的Animation动画技巧与细节
The instanceof operator in ecmascript7 specification
Insight -- the application of sanet in arbitrary style transfer
什么都2020了,LINQ查询你还在用表达式树
统计文本中字母的频次(不区分大小写)
The CPU does this without the memory
The most hard core of the whole network explains the computer startup process
Don't treat exceptions as business logic, which you can't afford
随机推荐
ECMAScript7规范中的instanceof操作符
GrowingIO 响应式编程探索和实践
Web安全(四)---XSS攻击
Cpp(一) 安装CMake
On hiz buffer
awk实现类sql的join操作
留给快手的时间不多了
[original] the influence of arm platform memory and cache on the real-time performance of xenomai
你可能不知道的Animation动画技巧与细节
Web Security (1) -- browser homology strategy
Web Security (3) -- CSRF attack
How did I lose control of the team?
Assembly function MCALL systemstack asmcgocal system call
虚拟DOM中给同一层级的元素设置固定且唯一的key为什么能提高性能
Practice of Xiaoxiong school development board: real equipment access of smart street lamp sandbox experiment
看一遍就理解,图解单链表反转
What is the relationship between low code vs model driven?
Count the frequency of letters in text (case insensitive)
Search and replace of sed
Adobe media encoder /Me 2021软件安装包(附安装教程)