This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Way to use g++2.96 lib in g++3.x compiled app?


On Thu, Dec 04, 2003 at 11:10:20AM -0700, Brian Olsen wrote:
> The folks at Lizard Tech have a g++ 2.96 compiled library for decoding 
> the MrSID image format. I emailed them about getting a g++ 3.3 compiled 
> library instead and they blew me off.
> 
> Anyways, this doesn't fix my problem of having to integrate this 
> library. I don't want to back port all my code just because of a stupid 
> vendor.
> 
> My idea to get this to work is:
> 
> - Write a 'c' wrapper with the minimal functionality I need.
> - Compile 'c' wrapper with g++ 2.96
> - Resove the libstdc++ and MrSID library symbols in the 'c' wrapper 
> using g++ 2.96.
> 
> This should leave only 'c' compatible symbols in the wrapper .o file.
> 
> I've already written the 'c' wrapper and can compile it no problem.
> But what I don't know is how to selectively resolve symbols from just 
> the 2.96 libstdc++ and MrSID libraries.
> 
> I guess a way to describe it is to "partially link" a .o file.
> 
> Can anyone point me to what options for ld (if any) or some other 
> binutils type utility that I could use to do this?
> 
> Or am I just plain SOL?

If you have both MrSID and libstdc++ as static libraries, your best bet
may be to create a shared library, including the .a versions of both of
those and your wrapper .o, and then using a version script to only
export the C symbols.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]