- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Compilation fails with "identifier "bad_alloc" is ...
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
Discussions
Discussions
Discussions
Forums
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
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
тАО01-20-2009 08:07 AM
тАО01-20-2009 08:07 AM
Compilation fails with "identifier "bad_alloc" is undefined"
cpp: "/opt/aCC/include_std/iostream_compat/iostream.h", line 4: error 4052: Unknown preprocessing directive.
cpp: "/opt/aCC/include_std/iostream_compat/fstream.h", line 4: error 4052: Unknown preprocessing directive.
I have included the paths /opt/aCC/include and /opt/aCC/include/iostream during compilation and that solved my previous problems.
But now I have 3 new problems
"/opt/aCC/include/memory", line 493: error #2020: identifier "bad_alloc" is undefined
RWSTD_THROW_NO_MSG(tmp == 0, bad_alloc);
"/opt/aCC/include/stdexcept", line 73: error #2262: not a class or struct name
class RWSTDExport logic_error : public exception
"/opt/aCC/include/stdexcept", line 149: error #2262: not a class or struct name
class RWSTDExport runtime_error : public exception
When I have gone through the library files I could find all the very well defined in the path that I have included but it is not able to pick it up. I was wondering y.
Can anyone please help me on fixing this pls
- Tags:
- bad_alloc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2009 09:47 AM
тАО01-20-2009 09:47 AM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2009 01:04 PM
тАО01-20-2009 01:04 PM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
>cpp: "/opt/aCC/include_std/iostream_compat/iostream.h", line 4: error 4052: Unknown preprocessing directive.
Your preprocessor (cpp.ansi?) is broken. You'll need to enhance it to handle #warning.
I've already filed an enhancement QXCR1000529558 for this.
>I have included the paths /opt/aCC/include and /opt/aCC/include/iostream
As mentioned in your other thread, do NOT do this!
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1300257
If you can't change your preprocessor, you'll need to remove all cfront (-AP) iostream includes and replace by the Standard ones,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2009 02:10 PM
тАО01-20-2009 02:10 PM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2009 02:47 PM
тАО01-20-2009 02:47 PM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
cpp.ansi doesn't know about #warning, so +legacy_cpp can't be used.
>I use aCC compiler.
Why are you using cpp.ansi or +legacy_cpp?
>But without including the path it is not able to pick up the default libraries even.
You will have to provide some proof of this. Do you have an error and the -v output?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2009 02:55 PM
тАО01-20-2009 02:55 PM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
+Aa +p +O2 +Ofltacc=relaxed +Onolimit +DSmontecito +FPD -Wl,+pi,1M -Wl,+pd,1M -Wl,+mergeseg +DD64 +M2 -Wl,+s +w1
I know nothing about cpp.ansi or +legacy_.
But what I am doing is porting the code that was being run on very much older version of hpux to itanium2 now.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2009 03:07 PM
тАО01-20-2009 03:07 PM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
Are you sure you aren't using some type of SQL preprocessor?
>But what I am doing is porting the code that was being run on very much older version of HP-UX to Integrity
You are doing a port from -AP to -AA. Those #warning are trying to tell you to change your source, if you want to be Standard.
- Tags:
- -AA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2009 03:19 PM
тАО01-20-2009 03:19 PM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
So how do I make them standard.
- Tags:
- ProC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-20-2009 04:00 PM
тАО01-20-2009 04:00 PM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
Then your SQL preprocessor is broken and you need to get it fixed.
>So how do I make them standard?
If you look at the lines in question it tells you:
#warning
#include
using namespace std;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 05:20 AM
тАО01-21-2009 05:20 AM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-21-2009 01:42 PM
тАО01-21-2009 01:42 PM
Re: Compilation fails with "identifier "bad_alloc" is undefined"
That what? Two things were discussed in my last reply. I mentioned the solution to the -AA porting. I have no clue how your broken preprocessing step works so all I can do is hand wave.