Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Including static library inside a shared library.

807575Aug 7 2005 — edited Jan 10 2006
I need to link one static library, one shared library
and couple of object into an executable.

I am trying to link static library inside the shared object (so) and then link just the shared object to make executable, but compiler is giving linker errors for undefined symbols in static library.

When I took the dump of shared object
sgs36a-0032 [/home/vbasarka/SOURCE/BSE/DebugLib]#dump -Cv libBSEShell_D_MT_100.so | grep _bse  
[3293]   0x86a08     52       FUNC      GLOB      0     10      void*_bse_realloc(void*,unsigned)       [__1cM_bse_realloc6FpvI_0_]
[3560] 0x0 0 FUNC GLOB 0 UNDEF int BSESHELL_NAMESPACE::_bse_vscprintf(const char*,void*) [__1cSBSESHELL_NAMESPACEO_bse_vscprintf6Fpkcpv_i_]
[3597] 0x0 0 FUNC GLOB 0 UNDEF int BSESHELL_NAMESPACE::_bse_vscwprintf(const wchar_t*,void*)[__1cSBSESHELL_NAMESPACEP_bse_vscwprintf6Fpkwpv_i_]
[4765] 0x869a0 28 FUNC GLOB 0 10 void _bse_free(void*) [__1cJ_bse_free6Fpv_v_] [5781] 0x869d0 40 FUNC GLOB 0 10 void*_bse_malloc(unsigned) [__1cL_bse_malloc6FI_pv_]
I see that those symbols in static library are still undefined even after including it with -l option while making this shared object.

Is this functionality not supported by sun compiler, as VC7 Compiler supports this I was expecting to have it in sun compiler too. Any ideas ??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 7 2006
Added on Aug 7 2005
18 comments
999 views