Re: Linking two shared object libs with same symbols, Solaris 2.6
From: Casper H.S. Dik (Casper.Dik_at_Sun.COM)
Date: 06/07/04
- Previous message: Dan Pop: "Re: Long term nuclear waste disposal (was: The Year 2038 Problem)"
- In reply to: cesars_at_nortelnetworks.com: "Linking two shared object libs with same symbols, Solaris 2.6"
- Next in thread: cesars_at_nortelnetworks.com: "Re: Linking two shared object libs with same symbols, Solaris 2.6"
- Reply: cesars_at_nortelnetworks.com: "Re: Linking two shared object libs with same symbols, Solaris 2.6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 07 Jun 2004 15:31:26 GMT
cesars@nortelnetworks.com (cesars@nortelnetworks.com) writes:
>I have an application running on Solaris 2.6 that is linking with two
>shared object libs ( libv2.so and libv4.so ). These two libs are
>basically two wrapper classes that make API calls to two other .so
>libs ( libver2.so and libver4.so ), the API functions are the
>same on both libver2.so and libver4.so, that's the reason I created
>the wrapper classes. The libv2.so links with libver2.so and libv4.so
>links with libver4.so without any problems.
>My app compiles and links without any problems either, but when I run it,
>only one set of the API calls work, either the one on libver2.so or
>libver4.so, but not both at the same time.
>I have narrowed the problem to the order of the libraries at linking
>time. If I do "..... -lv2 -lv4 ......" only the API calls to liver2.so work
>but not the ones to libver4.so. If I reverse the order of the libraries
>"..... -lv4 -lv2 ....." the opposite happens and only API calls in the
>libver4.so work.
>How do I make the executable to actually have both of them at the same
>time?
Try linking the wrapper libraries with -Bdirect.
Casper
-- Expressed in this posting are my opinions. They are in no way related to opinions held by my employer, Sun Microsystems. Statements on Sun products included here are not gospel and may be fiction rather than truth.
- Previous message: Dan Pop: "Re: Long term nuclear waste disposal (was: The Year 2038 Problem)"
- In reply to: cesars_at_nortelnetworks.com: "Linking two shared object libs with same symbols, Solaris 2.6"
- Next in thread: cesars_at_nortelnetworks.com: "Re: Linking two shared object libs with same symbols, Solaris 2.6"
- Reply: cesars_at_nortelnetworks.com: "Re: Linking two shared object libs with same symbols, Solaris 2.6"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]