当前位置:网站首页>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]所创,转载请带上原文链接,感谢
边栏推荐
猜你喜欢

获取树形菜单列表

手撕算法-手写单例模式

Don't treat exceptions as business logic, which you can't afford

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?

A detailed explanation of microservice architecture

Improvement of maintenance mode of laravel8 update

C language I blog assignment 03

编程界大佬教你:一行Python代码能做出哪些神奇的事情?
随机推荐
Adobe media encoder /Me 2021软件安装包(附安装教程)
easyui dialog“缓存问题”
C language I blog assignment 03
Adobe Lightroom / LR 2021 software installation package (with installation tutorial)
云计算之路-出海记:整一台 aws 免费云服务器
When tidb and Flink are combined: efficient and easy to use real-time data warehouse
Animation techniques and details you may not know
尾-递
Search and replace of sed
Cpp(二) 创建Cpp工程
【C++学习笔记】C++ 标准库 std::thread 的简单使用,一文搞定还不简单?
How to learn technology efficiently
Adobe Prelude /Pl 2020软件安装包(附安装教程)
In the age of screen reading, we suffer from attention deficit syndrome
Kylin on kubernetes' practice on eBay
WPF 关于绘图个人总结
The most hard core of the whole network explains the computer startup process
一万四千字分布式事务原理解析,全部掌握你还怕面试被问?
delphi10的rest.json与system.json的踩坑
面部识别:攻击类型和反欺骗技术