- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- aCC Compile Error 585
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008 12:27 AM
05-21-2008 12:27 AM
aCC Compile Error 585
Error 585: ./h/typemgr_intern.h, line 139 # Expected an operator before '::'.
const o_double MAX = (std::numeric_limits::max)();
^^
Error 172: ./h/typemgr_intern.h, line 139 # Undeclared variable 'std'.
const o_double MAX = (std::numeric_limits::max)();
The compiler call looks like this:
aCC -I. -I./h -I../h -I../om/h -I../sm/h -O -c +Z +DA2.0W +DS2.0 -DHP11 -mt -DVS_USE_64_CALLS -D_LARGEFILE64_SOURCE -o /build/qa/VOD/VOD_7.x_Integration/VOD7.0.1.4-144-20080520_2030/HP-UX_64bit/opt/build_area/kernel/7.0.1.4/HP-UX_64bit/opt//o/typemgr.o /versant/vod/qa.local/VOD_7.x_Integration/VOD7.0.1.4-144-20080520_2030/src/kernel/typemgr/typemgr.c
Would be great if someone can help me.
Thanks,
Guido
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2008 02:18 AM
05-21-2008 02:18 AM
Re: aCC Compile Error 585
If you want to use the std namespace, you'll need to compile with -AA. Be aware the default on PA is -AP and if your application is going to use third party C++ libs, you may have to port back to -AP mode:
http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801/?ciid=eb08b3f1eee02110b3f1eee02110275d6e10RCRD
>Error 172: # Undeclared variable 'std'.
namespace std isn't defined.
>aCC -O -c +Z +DA2.0W +DS2.0 -mt -D_LARGEFILE64_SOURCE
You should replace obsolete +DA2.0W by +DD64.
- Tags:
- -AA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2008 10:32 PM - edited 02-22-2012 09:22 PM
05-25-2008 10:32 PM - edited 02-22-2012 09:22 PM
Re: aCC Compile Error 585
>const o_double MAX = (std::numeric_limits::max)();
What do you think this syntax should be doing?
Did you want to do:
const o_double MAX = numeric_limits::max();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 12:03 AM
05-26-2008 12:03 AM
Re: aCC Compile Error 585
Thanks,
Guido
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2008 12:45 AM
05-26-2008 12:45 AM
Re: aCC Compile Error 585
http://forums.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2008 10:43 PM
06-10-2008 10:43 PM
Re: aCC Compile Error 585
Could you please let me know, how can i compile the following statement on PA-RISC
using the following conf:
aCC: HP ANSI C++ B3910B A.03.57
HP-UX B.11.11 U 9000/800 109092009 unlimited-user license
The statement is:
const o_double MAX = (std::numeric_limits
Currently I can compile the above statement using -AA, but i need to compile with the default on PA-RISC which is -AP, Could you please let me know how can modify the above statement in order to get compile with -AP.
I have gone thru the following FAQ's.
Can I use this in any way:
11. Can I write code that works for both?
Yes. Only with conditional compilation. And/or by using the following
namespace std:: construct:
namespace std {} using namespace std;
You can put this construct anywhere, as many times as you like. Or once at the beginning - as long it is before you reference any symbol that doesn't have the needed std::. And you can use it with -AP too.
Regards,
Neel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 01:12 AM
06-11-2008 01:12 AM
Re: aCC Compile Error 585
>const o_double MAX = (std::numeric_limits
Why do you have an extra set of () around the function name? Remove it.
>but I need to compile with the default on PA-RISC which is -AP, Could you please let me know how can modify the above statement in order to get compile with -AP.
The simple way is to use:
const o_double MAX = numeric_limits
You can also use:
const o_double MAX = ::numeric_limits
That way you can evil macros and have std be replaced by empty:
#define std
>Can I use this in any way:
>namespace std {} using namespace std;
This works if you leave out "std::" in front of everything. Then you use the namespace directive to also look in namespace std in -AA mode, in the global namespace for -AP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 01:30 AM
06-11-2008 01:30 AM
Re: aCC Compile Error 585
Error 172: "./h/typemgr_intern.h", line 140 # Undeclared variable 'std'.
const o_double MAX = std::numeric_limits
^^^
Error 20: "./h/typemgr_intern.h", line 140 # ';' expected before '::'.
const o_double MAX = std::numeric_limits
^^
aCC throws the above error.
Regards,
Neel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 01:38 AM
06-11-2008 01:38 AM
Re: aCC Compile Error 585
const o_double MAX =
::numeric_limits
Thanks,
Neel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 01:41 AM
06-11-2008 01:41 AM
Re: aCC Compile Error 585
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 01:50 AM
06-11-2008 01:50 AM
Re: aCC Compile Error 585
Also, Could you please let me know, the diagnostic for the following warnings.
I have gone thru at: http://docs.hp.com/en/11925/Diagnostics_Documentation/Diagnostics_index.htm#2068
But could not find anything related to the same.
------------------------------------------------
Warning 829: "/dsk1/src/kernel/ut/chk/chkusage.c", line 940 # Implicit conversion of string literal to 'char *' is deprecated.
a_printf("\npart of the \"-sys\" module in case the module is not"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 829: "/dsk1/src/kernel/ut/chk/chkusage.c", line 942 # Implicit conversion of string literal to 'char *' is deprecated.
a_printf("\ne.g \"%s -check
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Warning 829: "/dsk1/src/kernel/ut/chk/chkusage.c", line 944 # Implicit conversion of string literal to 'char *' is deprecated.
a_printf("\n\n");
^^^^^^
Warning 749: "/dsk1/src/kernel/sl/slheap.c", line 2322 # The cast from 'h
eap_header *' to 'heap_shared *' is performed as a 'reinterpret_cast'. This oper
ation is non-portable and potentially unsafe.
err = sl_shared_extend(HEAP_SHARED(heap_header), desired_size,
^^^^^^^^^^^
Warning 749: "/dsk1/src/kernel/sl/slheap.c", line 2339 # The cast from 'h
eap_header *' to 'heap_local *' is performed as a 'reinterpret_cast'. This opera
tion is non-portable and potentially unsafe.
local = HEAP_LOCAL(heap_header);
^^^^^^^^^^
Thanks in advance.
Regards,
Neel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 02:05 AM
06-11-2008 02:05 AM
Re: aCC Compile Error 585
-AP uses the global namespace for the STL.
-AA uses namespace std.
>the diagnostic for the following warnings.
Which, the aCC6 ones for the aCC3 ones?
To get Warning 829, you may have to use +w but then you'll be sorry. :-)
Warning 749, there is none.
These two are the must likely warnings to be suppressed in aCC3.
Or did you want to fix them in aCC3??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 06:42 AM
06-11-2008 06:42 AM
Re: aCC Compile Error 585
Also, any suggestions to generalize or (remove the dependency) of the following code,i.e.
const o_double MAX = ::numeric_limits
Since, its got failed on other platform with the following error:
g++ -I. -I./h -I../h -I../om/h -I../sm/h -O -c -D_REENTRANT -DVS_USE_64_CALLS -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fpic -Wall -o /dsk1/VOD_BUILD/kernel/7.0.1.4/Linux_64bit_rhe4.0/opt//o/typemgr.o /vobs/kernel/typemgr/typemgr.c
In file included from /vobs/kernel/typemgr/typemgr.c:16:
./h/typemgr_intern.h: In function `o_err tm_isValid(o_typeid, T)':
./h/typemgr_intern.h:139: error: `numeric_limits' undeclared (first use this function)
./h/typemgr_intern.h:139: error: (Each undeclared identifier is reported only once for each function it appears in.)
./h/typemgr_intern.h:139: error: expected primary-expression before '>' token
./h/typemgr_intern.h:139: error: `::max' has not been declared
Thanks in advance.
Neel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 01:18 PM
06-11-2008 01:18 PM
Re: aCC Compile Error 585
You can squash them like a bug with +W829,749.
Note that 829 is going to be errors in the next Standard so you should fix them all. You need to declare a_printf as taking a const char*.
For 749, you can add the reinterpret_cast. Note the types in the message must not be derived classes from each other.
>any suggestions to generalize or (remove the dependency) of the following code
const o_double MAX = ::numeric_limits
You are going to have to use conditional compilation:
#if !defined(_HP_NAMESPACE_STD) && defined(__HP_aCC)
#define STD_NS
#else
#defined STD_NS std
#endif
const o_double MAX = STD_NS::numeric_limits
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 11:34 PM
06-11-2008 11:34 PM
Re: aCC Compile Error 585
I tried the following:
#if defined(__hpux)
#if !defined(_HP_NAMESPACE_STD)&&defined(__HP_aCC)
#defined STD_NS
#defined STD_NS std
#endif
const o_double MAX = STD_NS::numeric_limits
#else /* defined(__hpux)*/
const o_double MAX = (std::numeric_limits
#endif /* __hpux */
The compilation throws an error for STD_NS not defined ;-(
Could you suggest me the right way?
Neel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-11-2008 11:50 PM
06-11-2008 11:50 PM
Re: aCC Compile Error 585
You lost the #else and added a whole extra level of #if. Use what I gave you, it should work for aC++ or any other compiler.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2008 10:01 PM
06-15-2008 10:01 PM
Re: aCC Compile Error 585
Thanks it works as it is.
Best regards,
Neel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2008 05:09 AM
06-16-2008 05:09 AM
Re: aCC Compile Error 585
If you have gotten the answers you wanted, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2008 11:07 PM
06-18-2008 11:07 PM
Re: aCC Compile Error 585
I got the following error:
/usr/lib/dld.sl: Unresolved symbol: __shlinit (code) from /build/HP-UX_32bit/opt/lib/libembed.sl
My conf:
% uname -a
HP-UX B.11.11 U 9000/800 109092009 unlimited-user license
% aCC -V
aCC: HP ANSI C++ B3910B A.03.57
Any pointers/suggestion will be helpful.
Thanks,
Neel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2008 11:15 PM
06-18-2008 11:15 PM
Re: aCC Compile Error 585
>dld.sl: Unresolved symbol: __shlinit (code)
You need to create your own thread so you can assign points. Especially for this different topic.