use "old" .so-files with "new" compiler?

P

Philipp

Hi, I am quite sure this question has answered here already several
times, but I haven't found the answer yet. Anyway, here is the
question again:

I've got libraries (*.so) that are built with gcc 2.95.2. The gcc
version, I've installed on my computer, is 3.xx and I don't have the
source files of the libraries. Can I link those libraries without
uninstalling my new 3.xx-compiler?

Thanx for your answers in advance. Isn't there a secret flag like "gcc
-useoldlib"? *g*

Philipp
 
V

Victor Bazarov

Philipp said:
Hi, I am quite sure this question has answered here already several
times, but I haven't found the answer yet.

Perhaps you haven't been looking in right places...
Anyway, here is the
question again:

I've got libraries (*.so) that are built with gcc 2.95.2. The gcc
version, I've installed on my computer, is 3.xx and I don't have the
source files of the libraries. Can I link those libraries without
uninstalling my new 3.xx-compiler?

Usually, yes. However, if you have a way to rebuild them, do.
Thanx for your answers in advance. Isn't there a secret flag like "gcc
-useoldlib"? *g*

You would have to ask this in gnu.g++.help.

BTW, the Standard C++ guarantees compatibility between compilers
on the level of source code _only_. That concerns different
versions of the same compiler too. So, if you need to know for
sure whether GNU compilers have binary backward compatibility,
you need to ask them directly. This is a _language_ newsgroup,
not a particular compiler newsgroup. Just a BTW...

Victor
 
S

Shane McDaniel

Philipp said:
Hi, I am quite sure this question has answered here already several
times, but I haven't found the answer yet. Anyway, here is the
question again:

I've got libraries (*.so) that are built with gcc 2.95.2. The gcc
version, I've installed on my computer, is 3.xx and I don't have the
source files of the libraries. Can I link those libraries without
uninstalling my new 3.xx-compiler?


As Victor said, this is of topic

But g++ 3.x and g++ 2.x are binary INcompatible. Afaik you must
recompile the source if the source is in fact c++ code. C code does not
have such issues though.


-shane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top