gcc323 and gcc332 101

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I've created a very basic test routine to start my own
unique testing of a gcc323 and gcc332 install using c++ 
that I have recently placed in separate dirs in my NFS 
mounted home account on a solaris 8 box. Using c++ I get it 
to build and run but am having errors using #include<iostream>. 
Any replies are appreciated.

//#include "iostream.h"
//#include <iostream.h>
#include <iostream>
int main(void)
{
  cout << "main() reporting that GCC compiled this ok" << endl ;
  return (0);
} /* main */

I get it to build using #include <iostream.h> or #include "iostream.h"
but am warned with the following message:

[langley]:/home/philc/GCC/test>g++ -o test2 test2.cpp
In file included from [langley]:/home/philc/GCC/test>g++ -o test2
test2.cpp
In file included from
/home/philc/GCC/gcc323bin/include/c++/3.2.3/backward/iostream.h:31,
                 from test2.cpp:2:
/home/philc/GCC/gcc323bin/include/c++/3.2.3/backward/backward_warning.h:
32:2: warning: #warning This file includes at least one deprecated or
antiquated header. Please consider using one of the 32 headers found in
section 17.4.1.2 of the C++ standard. Examples include substituting the
<X> header for the <X.h> header for C++ includes, or <sstream> instead
of the deprecated header <strstream.h>. To disable this warning use
-Wno-deprecated.


I cannot get it to build using #include <iostream>.  I get the following
compile time error:

[langley]:/home/philc/GCC/test> g++ -o test2 test2.cpp
test2.cpp: In function `int main()':
test2.cpp:6: `cout' undeclared (first use this function)
test2.cpp:6: (Each undeclared identifier is reported only once for each 
   function it appears in.)
test2.cpp:6: `endl' undeclared (first use this function)


I though I understood the "" and <> meaning until now...
Regards,
Phil

Phil.Crescioli@xxxxxxxxxx


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux