Operating System - Linux
1753766 Members
5717 Online
108799 Solutions
New Discussion юеВ

Core when using shared libraries

 
SuperOskitar
New Member

Core when using shared libraries

Urgent!!
I have made a shared library and when i link other programs with it, they seem to work, but when i run them i got a core.

If i compile and link the program all together (without using shared libraries), it works fine.


The shared library is called common_C++.sl,
I've compiled objects with "-g +DA2.0W -AA +Z" option
And i've made the library using aCC with "-b" option.

(gdb) where
#0 0xc0000000002fa4e4 in kill+0x2c () from /usr/lib/pa20_64/libc.2
#1 0xc0000000002a924c in raise+0x2c () from /usr/lib/pa20_64/libc.2
#2 0xc0000000002de2e8 in abort_C+0x180 () from /usr/lib/pa20_64/libc.2
#3 0xc0000000002de34c in abort+0x1c () from /usr/lib/pa20_64/libc.2
#4 0xc0000000016523ac in std::terminate+0x3c () from /usr/lib/pa20_64/libCsup_v2.2
#5 0xc00000000165298c in ThrowException+0xd4 () from /usr/lib/pa20_64/libCsup_v2.2
#6 0xc000000001653038 in __throw__FPvT1+0x158 () from /usr/lib/pa20_64/libCsup_v2.2
#7 0xc000000001a96914 in std::ios_base::setf+0x8c () from /usr/lib/pa20_64/libstd_v2.2
#8 0xc000000001a9626c in std::ios_base::Init::Init+0x1ef8 () from /usr/lib/pa20_64/libstd_v2.2
#9 0xc000000001cea3e0 in std::__sinit_LogManager_cpp+0x30 () from /home/jld/QoSM/lib/common_C++.sl


Thanks in advance
Jose
3 REPLIES 3
RAC_1
Honored Contributor

Re: Core when using shared libraries

file core
This will atleast tell you which signal it exits on.
There is no substitute to HARDWORK
SuperOskitar
New Member

Re: Core when using shared libraries

core: ELF-64 core file - PA-RISC 2.0 from 'prueba' - received SIGABRT

SuperOskitar
New Member

Re: Core when using shared libraries

The problem was that the main program needs -mt flag to work.
But my library was not created with that flag, and so it does not work.
I am not quite sure why this happeneds, because i am not using threads, but i realiced that it was the only differnece.

Thanks for all
Jose