How to compile C program on command line using MinGW?

前端 未结 14 1290
天命终不由人
天命终不由人 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条回答
  •  不要未来只要你来
    2021-01-30 18:08

    First:

    Add your minGW's bin folder directory ( ex: C\mingw64\bin ) in System variables => Path. visual example


    Compile:

    .c: gcc filename.c -o desire

    .cpp: g++ filename.cpp -o desire


    Run:

    desire/ or ./desire

提交回复
热议问题