当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
- Using pipe() to improve code readability in pandas
- It's time to end bertology
- 【解决方案】分布式定时任务解决方案
- 14000 word distributed transaction principle analysis, master all of them, are you afraid of being asked in the interview?
- Web Security (3) -- CSRF attack
- Cpp(一) 安装CMake
- 模型预测准确率高达94%!利用机器学习完美解决2000亿美元库存难题
- 汇编函数mcall systemstack asmcgocall syscall
- 关于update操作并发问题
- 来自不同行业领域的50多个对象检测数据集
猜你喜欢

Improvement of maintenance mode of laravel8 update

What do you think of the most controversial programming ideas?

年薪90万程序员不如月入3800公务员?安稳与高收入,到底如何选择?

Improvement of maintenance mode of laravel8 update

Annual salary of 900000 programmers is not as good as 3800 civil servants a month? How to choose between stability and high income?

一万四千字分布式事务原理解析,全部掌握你还怕面试被问?

websocket+probuf.原理篇

Analysis of kubernetes service types: from concept to practice

Reflection on a case of bus card being stolen and swiped

android基础-RadioButton(单选按钮)
随机推荐
C++在C的基础上改进了哪些细节
IDEA-项目未自动生成 .iml 文件
Cpp(一) 安装CMake
ngnix集群高并发
Do not understand the underlying principle of database index? That's because you don't have a B tree in your heart
Reflection on a case of bus card being stolen and swiped
14000 word distributed transaction principle analysis, master all of them, are you afraid of being asked in the interview?
How to learn technology efficiently
graph generation model
awk实现类sql的join操作
easyui dialog“缓存问题”
洞察——风格注意力网络(SANet)在任意风格迁移中的应用
sed之查找替换
Web安全(二)---跨域资源共享
Kubernetes服务类型浅析:从概念到实践
Adobe media encoder /Me 2021软件安装包(附安装教程)
来自不同行业领域的50多个对象检测数据集
Assembly function MCALL systemstack asmcgocal system call
How did I lose control of the team?
[C + + learning notes] how about the simple use of the C + + standard library STD:: thread?