How to compile C program on command line using MinGW?

前端 未结 14 1291
天命终不由人
天命终不由人 2021-01-30 17:19

What command does one have to enter at the command line in Windows 7 to compile a basic C program?

Like I am literally wondering what you type in the command prompt, to

14条回答
  •  萌比男神i
    2021-01-30 17:55

    In Windows 10, similar steps can be followed in other versions of windows.

    Right Click on "My Computer" select Properties, Goto Advanced System Settings -> Advanced -> Select "Environment Variables.." .

    Find "Path" select it and choose edit option -> Click on New and add "C:\MinGW\bin" (or the location of gcc.exe, if you have installed at some other location) -> Save and restart command prompt. Gcc should work.

提交回复
热议问题