Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Linking with different compilers
I have some libraries from one vendor that was built with gcc 3.0.2. I
have another set of libraries from another vendor that was built with
gcc 3.3.

I need to link a program that uses both libraries. I can get the two
vendors stuff to link finally, but I'm having trouble with libstdc++
and libgcc_s. The first vendor supplied a version of these in his junk
and I have another version for gcc 3.3. I get incompatibulities
between libstdc++.so.3 in 3.0.2 and libstdc++.so.5 in gcc 3.3. Both
have a libgcc_s.so.1.

When I run the program, I get something to the effect:

exe : library : version GCC_3.3 not found (requied by
.../libstdc++.so.5

I running into problems when I run, in that it can't find versions.

Am I screwed? Or is there someway out of this? Neither vendor is
willing to redo their libraries.

Can I relink the 3.3 shared libries to make them static? I've also
tried to statically link in the 3.3 libstdc++.a library to no avail.

Help is appreciated in advance.

BTW, this is Linux 7.3 on Intel.

Thanks,

Report this thread to moderator Post Follow-up to this message
Old Post
Bill
08-23-04 09:02 PM


Re: Linking with different compilers
bill.volz@chevrontexaco.com (Bill) writes:

> I have some libraries from one vendor that was built with gcc
> 3.0.2. I have another set of libraries from another vendor that was
> built with gcc 3.3.

This would not be a problem for C, but for C++ you might as well
consider this code to be compiled by different compilers.

The class layout has changed between these versions, and so did
name mangling. The objects are not link-compatible.

> I need to link a program that uses both libraries.

You can't.

> Am I screwed?

Yes.

> Can I relink the 3.3 shared libries to make them static?

No: shared libraries on most UNIX systems are considered a "final"
product, and can't be re-linked any more than you can re-link an
existing executable.

> BTW, this is Linux 7.3 on Intel.

You'll probably get answers faster in comp.os.linux.development.{apps,system
}.

Cheers,
--
In order to understand recursion you must first understand recursion.


Report this thread to moderator Post Follow-up to this message
Old Post
Paul Pluzhnikov
08-25-04 08:59 PM


Re: Linking with different compilers
I had a similar problem at work not long ago. We ended up convincing
the vendor to recompile with gcc 3.3 after trying fake the
libstdc++.so.3 by symlinking it from libstdc++.so.5. Unfortunately
encountered symbol changes from libstdc++.so.3 to libstdc++.so.5.

I am not sure if you can statically link in the code.

One possible way out of this conundrum is to wrap each library as a
RPC/CORBA server and make method calls between them as needed. I must
admit it is not the nicest of solutions.

Best of luck

tee

On Mon, 23 Aug 2004 12:11:26 -0400, Bill wrote:

> I have some libraries from one vendor that was built with gcc 3.0.2. I
> have another set of libraries from another vendor that was built with
> gcc 3.3.
>
> I need to link a program that uses both libraries. I can get the two
> vendors stuff to link finally, but I'm having trouble with libstdc++
> and libgcc_s. ...

Report this thread to moderator Post Follow-up to this message
Old Post
Unknown
08-25-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Compilers archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:45 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.