Print this article Edit this article

Unix: Using the GNU C/C++ Compiler

Purdue Engineering Computer Network


If you want to use the GNU C (gcc) compiler to compile your code from the command line just type:

	gcc myprog.c	(every time you want to compile)

If you use Makefiles to compile your programs, then put the following line at the top of your Makefile:

	CC=gcc

If you have problems with this compiler, send a "trouble" report with a description of the problem.

For information on gcc, see our stock answer on What C Compilers are available. You may also type the following from your prompt:

	% man gcc

Finally, if you are familiar with the info system in emacs, there is information on gcc available by entering info with the keystrokes:

	C-h i

After entering emacs. You will find information on how to run the GNU compiler.

Last Modified: Dec 19, 2016 11:12 am US/Eastern
Created: Nov 6, 2007 3:28 pm US/Eastern by admin
JumpURL: