Search code examples
cygwinc99

how to specify the C standard type if my compiler is Cygwin?


I am using Cygwin for my compiler while coding in Codeblocks IDE. Here is what I did in Cygwin 64:


$ gcc -std=c99
gcc: fatal error: no input files
compilation terminated.

However, it's not working. What is the proper way to do this?


Solution

  • To compile a c program in its simplest form to a certain standard, you can use the following command:

    gcc -std=c99 -W -Wall main.c -o main