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

Discussion in 'C++' started by Philipp, Jul 1, 2003.

  1. Philipp

    Philipp Guest

    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
    Philipp, Jul 1, 2003
    #1
    1. Advertising

  2. "Philipp" <> wrote...
    > 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
    Victor Bazarov, Jul 1, 2003
    #2
    1. Advertising

  3. [OT]Re: use "old" .so-files with "new" compiler?

    Philipp wrote:
    >
    > 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
    Shane McDaniel, Jul 1, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jim Hill
    Replies:
    3
    Views:
    388
    Jim Hill
    Feb 12, 2007
  2. Today's Mulan

    new question about old C compiler

    Today's Mulan, Jul 17, 2006, in forum: C Programming
    Replies:
    4
    Views:
    276
    Rod Pemberton
    Jul 17, 2006
  3. Kza
    Replies:
    4
    Views:
    412
    Andrew Koenig
    Mar 3, 2006
  4. *Prot3anThr3ad*

    old repository for old C++ source code

    *Prot3anThr3ad*, Sep 29, 2006, in forum: C++
    Replies:
    6
    Views:
    365
    *Prot3anThr3ad*
    Oct 2, 2006
  5. John Henry
    Replies:
    24
    Views:
    991
    alex23
    May 30, 2008
Loading...

Share This Page