环境准备。

安装mingw并设置好系统PATH

mingw。windows下的GUN编程环境。

系统变量的作用——可运行文件的搜索路径。

这样在cmd直接输入g++就能调用到D:\Program Files (x86)\CodeBlocks\MinGW\bin\g++.exe。

Compile cpp File Manually without IDE under Mingw EnvironmentCompile cpp File Manually without IDE under Mingw Environment

打开cmd后的默认工作文件夹为 C:\Users\Administrator。

Compile cpp File Manually without IDE under Mingw Environment

 

g++gcc

gcc仅仅负责编译,不负责链接标准库,所以直接生成exe程序的话要用g++,它会调用gcc

g++ hi.cpp -o hi   可生成hi.exe

Compile cpp File Manually without IDE under Mingw Environment

相关文章:

  • 2021-05-07
  • 2022-12-23
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
猜你喜欢
  • 2022-12-23
  • 2021-06-13
  • 2021-10-23
  • 2022-03-09
  • 2021-07-22
  • 2022-12-23
  • 2021-09-25
相关资源
相似解决方案