Gcc version-ABI mismatch

V

Vinay Gudur

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
 
R

red floyd

Vinay said:
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
 
R

Rolf Magnus

Vinay said:
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.
 

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

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top