Operating System - HP-UX
1748111 Members
3535 Online
108758 Solutions
New Discussion юеВ

Re: Porting code from classic to standard C++ - aCC A.03.55 on HPUX 11.00/PA-RISC

 
Stefan Puiu
Advisor

Porting code from classic to standard C++ - aCC A.03.55 on HPUX 11.00/PA-RISC

Hello,

we have a project here that runs on HP-UX 11.00 (PA-RISC) and also on Solaris and Windows. Until the present version, C++ code would be compiled under HP-UX using the classic C++ library; now we want to move to the new C++ library and have a bit of trouble with some class members not present anymore in the new iostream library. The main offender is streambuf.base(), which doesn't seem to exist in the new library. Is there any equivalent for it in the standard C++ library that we could use? Basically, we have a class that inherits from streambuf and manipulates some of its protected members (like base()). Are there any other things I should know about this transition? Thanks in advance.
2 REPLIES 2
Zygmunt Krawczyk
Honored Contributor

Re: Porting code from classic to standard C++ - aCC A.03.55 on HPUX 11.00/PA-RISC

Stefan Puiu
Advisor

Re: Porting code from classic to standard C++ - aCC A.03.55 on HPUX 11.00/PA-RISC

This was helpful, too:
http://h21007.www2.hp.com/cmdspp/QuestionAnswer/1,1764,1320202B-67BE-440A-8A2C-49DE4D089E42,00.html

Anyway, is there some way to mix code that uses classic iostreams with code that uses standard C++? On Solaris this seems to be possible (standard C++ support is on by default and you can specify -library=iostream to link with the old library), but as far as I understand from the documentation, on HP you can either:

1) use classic iostreams and not have namespace std, newer STL and other standard C++ stuff; I don't think we can do this, since we have quite a significant amount of new code that uses STL and std:: classes.

2) use new iostreams and standard C++ features. This would require getting rid of dependencies on old iostreams.

Are there any other options? Somebody reported on CXX-DEV that they could mix -AA code that was using new iostreams with old code that didn't use streams at all, but I'd be interested in the opposite - mix code compiled with -AP using old iostreams with code that uses standard C++ (and is compiled with -AA) but doesn't use iostreams at all.