Search code examples
cgccterminalmingwexecution

How do I run my .c program from terminal in one line?


I use the Min-GW GCC compiler on Windows 10. Every time I compile, I need to make a .exe and then run it. Could there be any way to do the whole thing in one step?


Solution

  • You can combine commands in windows like you do on linux or macos!

    gcc compilefile && c:/executefile.exe
    

    (you need to replace that stuff with min-gw and your exe path)

    links: