Gcc version-ABI mismatch

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vinay Gudur

    #1

    Gcc version-ABI mismatch

    Hi,
    I have built a static library with a "C" interface and internally
    written in C++. I have used most of the features of C++ like RTTI,
    Inheritance, Virtual functions internally but have exposed only C
    interface for the library user.
    I have built the library in gcc 2.7. And the applications which
    uses this library will be compiled in gcc 2.97. As per my knowledge,
    gcc 2.7 is not strictly ABI (Application Binary Interface) compliant.
    But, the application I have built seeems to be working fine without
    any problems and all my functionalities are working fine as expected.
    I wanted to know if there are any risks in using the library this way.
    I understand that using higher versions of gcc with ABI compliance
    should not give any problem.


    Thanks,
    Vinay Gudur
  • red floyd

    #2
    Re: Gcc version-ABI mismatch

    Vinay Gudur wrote:
    Hi,
    I have built a static library with a "C" interface and internally
    written in C++. I have used most of the features of C++ like RTTI,
    Inheritance, Virtual functions internally but have exposed only C
    interface for the library user.
    I have built the library in gcc 2.7. And the applications which
    uses this library will be compiled in gcc 2.97. As per my knowledge,
    gcc 2.7 is not strictly ABI (Application Binary Interface) compliant.
    But, the application I have built seeems to be working fine without
    any problems and all my functionalities are working fine as expected.
    I wanted to know if there are any risks in using the library this way.
    I understand that using higher versions of gcc with ABI compliance
    should not give any problem.
    Two things.

    1. You're OT here. Ask in gnu.g++.help
    2. OT, but what the hey. gcc 2.7 is horrendously out of date.
    Second, there was no official 2.97 for gcc (2.95 was the last
    *OFFICIAL* 2.9x), but again, ask in gnu.g++.help

    Comment

    • Rolf Magnus

      #3
      Re: Gcc version-ABI mismatch

      Vinay Gudur wrote:
      Hi,
      I have built a static library with a "C" interface and internally
      written in C++. I have used most of the features of C++ like RTTI,
      Inheritance, Virtual functions internally but have exposed only C
      interface for the library user.
      I have built the library in gcc 2.7.
      Hmm, gcc 2.7.0 was released in the year 1995.
      And the applications which uses this library will be compiled in gcc
      2.97.
      There is no such thing as gcc 2.97.
      As per my knowledge, gcc 2.7 is not strictly ABI (Application Binary
      Interface) compliant.
      Not sure what you mean by "ABI compliant". There is no standard ABI.
      But, the application I have built seeems to be working fine without
      any problems and all my functionalities are working fine as expected.
      I wanted to know if there are any risks in using the library this way.
      As long as you link to the libstdc++ belonging to gcc 2.7, I'd say that
      could work. But I'm not sure what happens if your program is C++ too and
      you start linking two different versions of the C++ standard library into
      your program.

      Btw: Your question is off-topic here. You should ask in a more appropriate
      newsgroup, like gnu.g++.help. comp.lang.c++ only deals with standard C++,
      not with any specific compilers or other build tools.

      Comment

      Working...