Operating System - HP-UX
1833144 Members
3471 Online
110051 Solutions
New Discussion

problem with aCC and rogue wave stl

 
SOLVED
Go to solution
Jean-Philippe Gois
New Member

problem with aCC and rogue wave stl

Hi.
I'm trying to compile an application that uses the rogue wave stl and the header.
They seem to be incompatible. The symbol "times" is defined in /usr/include/sys/times.h and in /opt/aCC/include/functional , and of course aCC does not like that...

Can someone tell me where I will find a solution for that problem?

my config is : PA-RISC 2.0 with hpux 11i and aCC B3910B
7 REPLIES 7
Steve Steel
Honored Contributor
Solution

Re: problem with aCC and rogue wave stl

Hi


IN the s700_800 11.x HP aC++ -AA runtime libraries (aCC A.03.50)

They replace times with multiplies in the times.h include file

latest is
PHSS_28879

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Jean-Philippe Gois
New Member

Re: problem with aCC and rogue wave stl

The sysadmin here still have to apply this patch, so I didn't see the result. But from the specs, it looks like the exact solution I need.

Thanks a lot!
Jean-Philippe Gois
New Member

Re: problem with aCC and rogue wave stl

Well, it looks like I spoke too soon. swinstall won't install the patch because it is for hpux 11.00 and 11.10, but we are running 11.11...

I looked for a similar patch for 11.11 in the patch database and I couldn't find any, but I may have missed it...

Is there something else I could do? (other than re-write the code using ...)
Balakumar M
Frequent Advisor

Re: problem with aCC and rogue wave stl

Hi,
Good day, try to get latest patch information from HP, or try with "gcc" compiler, check with your system admin weather gcc compiler is installed or not.

You can also find the latest patch list in th below link

http://www2.itrc.hp.com/service/patch/search.do

-bala
Life is a continues learning process
Jean-Philippe Gois
New Member

Re: problem with aCC and rogue wave stl

Unfortunately, I'm working on a old application that had been badly written and that is rather huge.
I tried once to compile it with gcc, but with no luck. The amount of work to achieve this task is too big. So, it's not that I enjoy it (even if aCC has its good sides), but we are stuck with aCC at the moment.

And I still could not find any patch corresponding to PHSS_28879 for hpux 11.11
BTW, Bala, the link on your post did not work for me. Maybe it's because I'm registered at the European site (but I can consult the patch database by browsing through itrc.hp.com).

Would it be a bad idea to use another implementation of the stl?
If not, which one should I choose?
Steve Steel
Honored Contributor

Re: problem with aCC and rogue wave stl

Hi


Try this


If you run into a name clash with a "times" symbol, it is ok to define the __HPACC_USING_MULTIPLIES_IN_FUNCTIONAL symbol and use multiply. The only downside that I know of is that if another library in your software stack does not do the same, and for some reason you want to compare addresses of function objects, that wouldn't work. Very unlikely though.

Also, on recent versions of aC++ you can define __HPACC_STRICTER_ANSI__ to enable this and a few other new library features. (Check the header to see if your aC++ version has this.)



Defining the macro __HPACC_STRICTER_ANSI__ should resolve the problem.

That is,

$ aCC -D__HPACC_STRICTER_ANSI__ -c times.cpp



Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Jean-Philippe Gois
New Member

Re: problem with aCC and rogue wave stl

I added "-D__HPACC_STRICTER_ANSI__" to my compiler options and it works just fine. And I don't think we will be annoyed with the restrictions over the adresses of functions.

Thanks, Steve!