cmake make指令

Kelvin

c++文件编译成exe可执行文件方法

1.编写CMakeLists.txt文件,通过cmake指令生成makefile文件,通过make(linux)/mingw32-make(win)指令生成exe文件
2.g++/gcc指令

CMakeLists.txt

CMake基本用法

gcc/g++

GNU is a free operating system
GCC(GNU编译器套件):GNU Compiler Collection。可以编译C、C++、JAVA、Fortran、Pascal、Object-C、Ada等语言
gcc是GCC中的GNU C Compiler(C 编译器)
g++是GCC中的GNU C++ Compiler(C++编译器)

  • Title: cmake make指令
  • Author: Kelvin
  • Created at: 2023-02-14 00:00:00
  • Updated at: 2023-05-11 20:47:09
  • Link: https://yanwc.com/2023/02/14/2023-02-14-cmake-make/
  • License: This work is licensed under CC BY-NC-SA 4.0.