当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- 尾-递
- What is the relationship between low code vs model driven?
- How to think in the way of computer
- 不懂数据库索引的底层原理?那是因为你心里没点b树
- Improvement of maintenance mode of laravel8 update
- 手撕算法-手写单例模式
- 栈-括号的匹配
- Insight -- the application of sanet in arbitrary style transfer
- Thinkphp6中where条件中字段与字段比较条件的写法
- How to deal with data leakage and deletion related to business life and death?
猜你喜欢
随机推荐
Web安全(三)---CSRF攻击
What magic things can a line of Python code do?
C language I blog assignment 03
Design pattern of facade and mediator
技术总监7年自述——如何选择一家好公司
Insight -- the application of sanet in arbitrary style transfer
Annual salary of 900000 programmers is not as good as 3800 civil servants a month? How to choose between stability and high income?
ECMAScript7规范中的instanceof操作符
The emergence and significance of micro service
Web安全(四)---XSS攻击
The prediction accuracy of the model is as high as 94%! Using machine learning to solve the 200 billion dollar inventory problem perfectly
awk实现类sql的join操作
Jingtao project day09
Using pipe() to improve code readability in pandas
Improvement of maintenance mode of laravel8 update
Ubuntu下搜狗输入法的下载安装及配置
爆一个VS2015 Update1更新带来的编译BUG【已有解决方案】
awk实现类sql的join操作
Web Security (3) -- CSRF attack
On hiz buffer







