4
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by TkTkorrovi
0

Well the easiest, if you have only one input file, is

gcc something.c -o something.exe

But better is

gcc -std=c89 -Wall something.c -o something.exe

This is for windows, in linux the executables usually have no extension, they can have, but exe in linux is kind of ugly. For that of course, you need to have gcc, in windows preferrably with msys or better cygwin, as these give you bash-like shell (all are free). And, from that you can make a nice makefile, too :)

all:
	gcc -std=c89 -Wall something.c -o something.exe

And then to compile, you only have to write "make".

0

Well the easiest, if you have only one input file, is

gcc something.c -o something.exe

But better is

gcc -std=c89 -Wall something.c -o something.exe

This is for windows, in linux the executables usually have no extension, they can have, but exe in linux is kind of ugly. For that of course, you need to have gcc, in windows preferrably with msys or better cygwin, as these give you bash-like shell (all are free). And, from that you can make a nice makefile, too :)

all:
    gcc -std=c89 -Wall something.c -o something.exe

And then to compile, you only have to write "make".

That's fine is he uses gcc as a compiler.
What if he uses an IDE? He needs to specify what compiler he's using and also if he is refering to the process of compiling, and not to the process of writing a source file that eventually would be compile into an exe.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.