Unix: Using the GNU C/C++ Compiler

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.

Print Article

Related Services / Offerings (1)

Submit a General Support request using the "Purdue IT Request" button to the right. The Purdue IT Service Desk will examine, follow-up and route as needed.