Run C++ in command prompt - Windows

前端 未结 11 1630
逝去的感伤
逝去的感伤 2020-12-22 19:02

I know that everyone uses an IDE nowadays, but I just find it simpler to write my code in notepad++, compile it using a command prompt command, and run it from there too. At

11条回答
  •  梦毁少年i
    2020-12-22 19:15

    have MinGW compiler bin directory added to path.

    use mingw32-g++ -s -c source_file_name.cpp -o output_file_name.o to compile

    then mingw32-g++ -o executable_file_name.exe output_file_name.o to build exe

    finally, you run with executable_file_name.exe

提交回复
热议问题