Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help with executing on linux

Status
Not open for further replies.

pcs

MIS
Apr 29, 1999
1
US
hi,<br>
can anyone tell me how to properly compile and execute a c++ prog. thanks.
 
Well, that would depend on the compiler being used. <br>
Also I would need to know if it is a single source document or if you are linking several object files. If you could get me this information I could better answer your question.<br>

 
If it's a single file, then the gcc compiler should do the trick.<br>
For info on it read the man page (man gcc).<br>
Most source code that you download, will have a Makefile, and possible a configure script.<br>
If that is the case run the script (./configure), then<br>
reun make (just type: make), followed by (as root): make install<br>
<br>
But this info should be in the INSTALL and/or README files anyway.. :)<br>
<br>
- Milamber
 
If you are going to use g++, which comes with many versions of Linux, try this from the command line:<br>
<br>
g++ -o outputfile filename<br>
<br>
where -o is the option for specifying an output file and filename is your .cpp file.
 
what type of linux have you got?? <br>
<br>
Karl.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top