G++
Rupert Wood
me@rupey.net
Tue Apr 9 06:11:00 GMT 2002
Gregor Karzelek wrote:
> How can I say to g++ that he should print out the errors in a
> file not in the stdout (=screen)?
It outputs errors to stderr not stdout. stderr has file descriptor 2;
you could use shell redirects, e.g.:
g++ -c foo.cc -o foo.o 2>errorfile
> If I want to compile a X.o from a X.cpp shall I use gcc or g++?
> Both do it, but what shall i Rather use?
The main differences between g++ and gcc are that g++ will compile .c
files as if they were C++ and that g++ automatically includes libstdc++
when it is asked to link. You should use g++ for your link step.
Rup.
More information about the Gcc-help
mailing list