[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: How to Compile/Link/Run C program



Date forwarded: 	19 Oct 1998 04:25:55 -0000
From:           	"Max DiOrio" <romulus15 ccny com>
To:             	<redhat-install-list redhat com>
Subject:        	How to Compile/Link/Run C program
Date sent:      	Mon, 19 Oct 1998 00:18:10 -0400
Forwarded by:   	redhat-install-list redhat com
Send reply to:  	redhat-install-list redhat com
Hello, 
C programming in Linux is pretty easy. Redhat offers the GNU 
compiler which you invoke with the command "gcc."
	First, write your source code on one of the editors, vi, EMACs, 
Pico, joe, etc. I use vi. You type vi and the name of the file including 
the .c extension. If you find it difficult to use, try EMACs which is 
more intuitive but slower.
	If you write the source code and save it on vi:
		on the command line, type "gcc -c filename.c"
	If it compiles OK, then type:
	"make -k filename filename.o filename.c"
After that, you are done, at least as far as the simple programs I am 
learning goes.
	If you use EMACS, there is a compile command in the tools 
dropdown menu. Then use make -k , etc. again.
Have fun, Steve W.




> Hi,
> 
> I am new to C programming and I wish to program in linux.  At the college, the Vax machine all you have to do it create the source..then 
> cc filename    
> link filename   and then 
> run filename        
> What is the sequence of commands to Compile, link, then run a C program?  Thanx for the help.
> 
> Max DiOrio
> romulus15 ccny com
> 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]