This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
compiles under g++ but not gcc
- From: sol <sol at avalon dot pascal-central dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 27 Aug 2004 00:47:34 -0400
- Subject: compiles under g++ but not gcc
Hello, not sure I'm posting this to the right list, but I couldn't seem
to find any others.
I've noticed a problem compiling under g++ and gcc. a program I am
working on compiles fine under g++, but gives a number of errors with
gcc.
I have defined a simple structure in a header file, included this header
in the main file that uses this structure, and when I compile under gcc,
I get errors related to all variables of that structure type (the one
defined in the header); it does not recognize the structure type that
was defined in the header. When compiling under g++, there is no problem
at all.
While I could use try to use g++ to make this problem go away, I'd like
to know first why it's happening, and how to use gcc, as there's a
possibility I won't have access to g++ at the school's lab.
thanks!