gcc, the C compiler, and g++, the c++ compiler needs to be told which file you'd like to compile.
 
If I've written a program and called it "dirtydeeds.c" or "dirtydeeds.cpp", when I want to compile it, I'd type:
 
gcc dirtydeeds.c
 
OR
 
g++ dirtydeeds.cpp
 
This will generate a file called a.out in the directory where my source file was located. Then just type:
 
a.out
 
to run the program.
 
If you're like me, you'll get a crap load of errors. Vi has a nice feature to show you the line number, which makes finding the offending line easy.
 
Regards,
Nathan
----- Original Message -----
From: Michael
Sent: Thursday, May 04, 2000 5:38 AM
Subject: Re: [newbie] GCC...where are you???

when i type gcc in a terminal window i get gcc.colorgcc: No input files
I would like to be able to use the Gnu C++ compiler for a course in c programming
 and don't know how to get the darn thing to cooperate to where i can even do a hello world!
-- 
GIF87a�
 

Reply via email to