gccdirectoryexetarget

How to change the target directory of GCC compiler?


It always puts the .exe file into the same directory as the source file.
I'm not about to use any IDEs, just the command line tool.


Solution

  • Use the -o flag. You can give it a full path.