|
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
|
- [newbie] GCC...where are you??? James McLaughlin
- RE: [newbie] GCC...where are you??? David Ramsey
- Re: [newbie] GCC...where are you??? Anthony Huereca
- Re: [newbie] GCC...where are you??? Hopper
- Re: [newbie] GCC...where are you??? Mike & Tracy Holt
- Re: [newbie] GCC...where are you??? Paul
- RE: [newbie] GCC...where are you??? David Ramsey
- Re: [newbie] GCC...where are you??? Steve Philp
- RE: [newbie] GCC...where are you??? Bill . Gardner
- Re: [newbie] GCC...where are you??? Alan Shoemaker
- Re: [newbie] GCC...where are you??? James McLaughlin
- RE: [newbie] Hard drives Anthony Huereca
- [newbie] Seagate HDD's Paul
