Operating System - HP-UX
1767188 Members
2993 Online
108959 Solutions
New Discussion

Porting software from aCC to gcc, and having some errors

 
Fernando C. Jeronymo
Occasional Contributor

Porting software from aCC to gcc, and having some errors

Hi again! First, I want to thank you all for promptly helping me to install gcc 3.0.4 in my HPUX 11!


Now, my next problem ;)

We have a lot of libraries, written in C++ and we used aCC to compile them. Now, I am trying to compile the same libraries using gcc. Several of the .C files compile just fine and I get the .o (object) files without any problem. But some of my c++ files are complaining about ostream (probably a namespace problem).

So, I would like to know if any of you know how to make my code work under gcc without having to actually change it. Is there any flags or something I can use to set gcc so he won't use the new style streams?

Here is my code:

friend ostream& operator<<(ostream& os, const ACTKEY& key) ;

Here is my error:
types.h:153: warning: ISO C++ forbids
declaration of `ostream' with no type
types.h:153: `ostream' is neither function nor
member function; cannot be declared friend
types.h:153: parse error before `&' token


Thanks a lot again.
What we do in life echoes in eternity