This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: G++
- From: "Rupert Wood" <me at rupey dot net>
- To: <gregor at karzelek dot com>
- Cc: <gcc-help at gcc dot gnu dot org>
- Date: Tue, 9 Apr 2002 13:32:56 +0100
- Subject: RE: G++
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.