Operating System - HP-UX
1833758 Members
2945 Online
110063 Solutions
New Discussion

cc and shared library created with aCC

 
Pertti Elonen
New Member

cc and shared library created with aCC

Is it possible to load (dlopen) a shared library from a program, that is compiled with cc, if the so library is made with aCC ?

I tried but I got: libxxx.so load error Unresolved symbol: [Vtable]key:__dt__21__version
ed_type_infoFv (data) from libxx.so

If the loding program is compiled with aCC, it works. (The others will not switch to aCC).

regards
Pertti

1 REPLY 1
Steven Gillard_2
Honored Contributor

Re: cc and shared library created with aCC

Technically it is possible to call C++ from a C program but there are some rules to follow. Have a look at the file /opt/aCC/html/C/guide/otherlangs.htm on your system, it contains a section on what you'll need to do to the C code to get it to work.

The use of dlopen() will make things more difficult because you will have the aCC name mangling to deal with when looking up symbols. Eg the unresolved symbol in your case is really:

$ echo __dt__21__versioned_type_enfoFv | c++filt
__versioned_type_enfo::~__versioned_type_enfo()

Regards,
Steve