- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- linking C++ STL and C libraries
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
02-26-2003 07:44 AM
02-26-2003 07:44 AM
My binary dumps a core file when run with a BUS ERROR.
There seems to be a compatibility issue between "aCC -AA" and any other
compilation mode.
How can I create such a binary?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2003 08:31 AM
02-26-2003 08:31 AM
Re: linking C++ STL and C libraries
If there was a problem with dynamic linking it ends up with SIGABRT, not SIGBUS. SIGBUS is common for wrong data alignement for example...
Try analysig the core with debugger (i.e. gdb).
If you look for more detailed help don't be shy and describe the problem more preciselly. :)
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2003 03:38 AM
02-27-2003 03:38 AM
Re: linking C++ STL and C libraries
( no core dumped )
To enhance it, I need to use some functions from C object files ( compiled with cc ) linked to a shared library.
But when I ask to aCC to link to this library, there's no warning , everything semms okay.
Put when run, it failed before the main function and a core is dumped.
dde is unable to open it, seems like is trap in an infinite loop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2003 03:38 AM
02-27-2003 03:38 AM
Re: linking C++ STL and C libraries
( no core dumped )
To enhance it, I need to use some functions from C object files ( compiled with cc ) linked to a shared library.
But when I ask to aCC to link to this library, there's no warning , everything semms okay.
But when run, it failed before the main function and a core is dumped.
dde is unable to open it, seems like is trap in an infinite loop.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2003 05:23 AM
02-27-2003 05:23 AM
SolutionWhat I would do is try to run the binary from the debugger.
It should stop your process at the signal, just before generating a core (at least this gdb does at defaut). So you could have a backtrace of function calls at least.
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2003 08:00 AM
02-27-2003 08:00 AM
Re: linking C++ STL and C libraries
All I've got as debugger is dde.
I succeed to make it logging something, with "-ui line" option.
"dde Bin/command core" fill the display with many lines like this one.
?(dde/obj_elf_som) Unexpected class member type detected (DNTT index 0x1).
Have anyone a clue ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2003 09:07 AM
02-27-2003 09:07 AM
Re: linking C++ STL and C libraries
The debugger entries are also strange. But you said the library was made with cc and your binnary with aCC. As there are two different compilers there could be mayby some sort of incompatibility? I think that compiling options for both (library and executable) could be worth to check. Mayby there is something that should be switched for this sort of library (something like position indepent code).
Is this library used by any other binary?
I use aCC by myself and also STL, but I don't have -AA. Actually my compiler supports only -Aa (I think it's too old). But I have no problems neither with STL nor with C libraries.
Honestly I feel pretty lost too. Have you tried to start the process from the dde without a core? As I wrote it could mayby catch the signal before dumping the core and let you see something more informative.
One more thought - as these are C functions: are they declared as extern "C" in your header? If not - this can cause troubles.
Last thing is that you gave me much points (thank you kindly) and this problem began to marked as 'solved'. Mayby it would be worth of starting a new one to show it's not solved yet.
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2003 11:39 AM
02-27-2003 11:39 AM
Re: linking C++ STL and C libraries
If you do use -AA to put the system libraries in the std namespace, then you must recompile all C++ code with the -AA option. Mixing C++ code with and without -AA will cause trouble.
You can get a newer gdb from
http://www.hp.com/go/wdb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2003 02:39 AM
02-28-2003 02:39 AM
Re: linking C++ STL and C libraries
I finally succeed to make a workable binary.
I learnt two points :
Don't forget "-mt" option ...
Don't link to useless libraries, if you don't call any of their fonctions ...
Any of them make a bad binary.