Search code examples
cgcc

Command to run GCC compilation?


I am using the GCC compiler but I want the to code the actually run after compilation. Is there a flag I can use for this? Right now I am just doing

  gcc code.c

There is no code.exe being generated...


Solution

  • The file created by default is called a.out. If you want to name it code.exe, the correct line should be gcc -o code.exe code.c