1833302 Members
3069 Online
110051 Solutions
New Discussion

use stl in hp_ux

 
SOLVED
Go to solution
Jack_27
Advisor

use stl in hp_ux

Hi,

I'm getting in trouble while using stl on HP_UX.
1."#include " and "using namespace std" can't be identified by aCC compiler,finally resolve it with add "-AA" option.Is there any better solution?
2.I have declare "#include ", but errors still occured:
Error 419: "../incl/simpletype.h", line 23 # 'string' is used as a type, however has not been defined as a type.
virtual int push(string str, int val);

I have tried to change it into "#include " or add the actual path of string but all failed.
Could you give me your opinion?

Thanks
Jack
3 REPLIES 3
Jack_27
Advisor

Re: use stl in hp_ux

Is there someone who will give me some suggestion?

Thanks
Jack
Steven Gillard_2
Honored Contributor
Solution

Re: use stl in hp_ux

Jack,

Using -AA is ok, all it does is force the latest set of libraries to be used which isn't a bad thing. See the online guide for more info:

http://docs.hp.com/hpux/onlinedocs/dev/aCC/a_03_33/options.htm#optioncap-AA

What release of the compiler are you running? Ensure you're up to date and have the latest patches installed. See the following page for release information:

http://dsportal.eservices.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1743,00.html

Does the string class work if you use it in a simple 'hello world' type program? To troubleshoot further, you could use the -P option to generate a .i file (which means only the preprocessing step is done). Then look through this file and make sure the string class is defined and typedef'd correctly.

Hopefully some of this points you in the right direction!

Regards,
Steve
Jack_27
Advisor

Re: use stl in hp_ux

Steven

Thanks a lot.I have gotten what I want.
It seems that there's much difference between HP_UX and other Unix/Linux while using C++ libraries and compiler.

Cheers
Jack