This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: STL includes don't seem to take effect in g++ 3.0.2


>>>>> "Jeremy" == Jeremy Lin <jjlin@OCF.Berkeley.EDU> writes:

    Jeremy> I recently built gcc 3.0.2 on solaris 8, and g++ won't
    Jeremy> compile programs using the STL (gcc works fine
    Jeremy> though). For example, this simple program:

cout and endl are declared in namespace `std'.

#include <iostream>

int main () { 
   std::cout << "hello world" << std::endl; 
   return 0; 
}

    Jeremy> yields:

    Jeremy> hello.cc: In function `int main()': hello.cc:5: `cout'
    Jeremy> undeclared (first use this function) hello.cc:5: (Each
    Jeremy> undeclared identifier is reported only once for each
    Jeremy> function it appears in.)  hello.cc:5: `endl' undeclared
    Jeremy> (first use this function)

    Jeremy> Running with -v gives: --- Reading specs from

[snip]

HTH
Claudio


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]