On 12-Aug-99 Ty Mixon wrote:
> 2)  This isn't really a Mandrake question, but most of y'all are 
> helpful so . . .
> 
> I'm taking Computer Science I this semester and will finally begin 
> learning C++. Should have picked up a book long ago, but never did.  
> Anyhow, what I want to know is how do I compile programs under Linux?  
> I think I have everything installed gcc and gcc++ and the libs and 
> (hopefully) the header files.
> 
> So, supposing I wanted to compile the obligatory beginning program 
> that prints the "Hello world" line, how would I?

For a small, simple program in one source code file, you could just type:

gcc <filename>  -- for a C program, or
g++ <filename>  -- for a C++ program

Assuming it compiles with no errors, that produces a binary file called a.out. 
You should take a look at the documentation for gcc and maybe documentation for
make as well.


-Tom

Reply via email to