Operating System - HP-UX
1752801 Members
5454 Online
108789 Solutions
New Discussion юеВ

aCC 3.35 complains when "using namespace std;"

 
Keith Hanlan
Occasional Advisor

aCC 3.35 complains when "using namespace std;"

I'm trying to build KDE 3.0.3 using aCC 3.35 on HP-UX 11.00. I've installed all the patches that I can find and should be 100% up-to-date. However, I continue to get error 697: "Only namespace names are valid here."

Should not std be defined by virtue of the C++ standard library?
2 REPLIES 2
Jack Tan
Occasional Advisor

Re: aCC 3.35 complains when "using namespace std;"

Based on the aC++ 3.33 documentation docs.hp.com, you need to add the "-AA" compiler option. This tells the compiler to use the new 2.x version of the Standard C++ Library, which has the "std" namespace enabled.

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

About the 2.x and 1.x libraries: http://docs.hp.com/hpux/onlinedocs/dev/aCC/a_03_33/infomap.htm#SL2

Hope this helps.

Jack
Keith Hanlan
Occasional Advisor

Re: aCC 3.35 complains when "using namespace std;"

Thanks Jack. That's perfect. I've been out of the aCC loop for about 18 months now. I guess it is time to catch up and read some release notes.

Unfortunately, it looks like the rest of the KDE3.0.3 code is causing grief for aCC. I've got some more troubleshooting ahead.
Thanks again.