473,800 Members | 2,725 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

what are C++ABI;s

what are ABI'sin C++
-Parag
Jun 27 '08 #1
19 1989
On May 14, 10:16*am, "parag_p...@hot mail.com" <parag_p...@hot mail.com>
wrote:
what are ABI'sin C++
-Parag
Do you mean this?

http://en.wikipedia.org/wiki/Applica...nary_interface

They are at best peripheral to this news group, as they
are not part of the language standard. How the language
connects and communicates with the OS is not defined in
any great detail for C++.
Socks
Jun 27 '08 #2
On May 14, 4:45 pm, Puppet_Sock <puppet_s...@ho tmail.comwrote:
On May 14, 10:16 am, "parag_p...@hot mail.com" <parag_p...@hot mail.com>
wrote:
what are ABI'sin C++
Do you mean this?
http://en.wikipedia.org/wiki/Applica...nary_interface
They are at best peripheral to this news group, as they are
not part of the language standard. How the language connects
and communicates with the OS is not defined in any great
detail for C++.
They are and they aren't relevant to the newsgroup. There have
been efforts to define a portable ABI for C++, at least for
specific platforms. (I think there is one for the Itanium
architecture.) And it's a constant source of discussion: why
can't I link code compiled with Borland with code compiled with
Microsoft (which is possible for C)? In many ways, it's a
serious problem with C++ that the question doesn't have any
answers which would be really relevant here: that if I have a
third party library which I have to use, and it is compiled with
Sun CC, I can't use g++. (See the thread on binary
compatility.) It's an issue which all C++ programmers face at
one time or another.

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Jun 27 '08 #3
James Kanze wrote:
And it's a constant source of discussion: why
can't I link code compiled with Borland with code compiled with
Microsoft (which is possible for C)?
A standardized ABI would allow even more than that. For example, it
would allow linking object files created by compilers of different
languages into the binary (such as for example object files created by a
pascal compiler).

Btw, isn't the .NET framework some kind of attempt to do exactly that,
ie. being able to call libraries made in any language from another language?
Jun 27 '08 #4
And it's a constant source of discussion: why
can't I link code compiled with Borland with code compiled with
Microsoft (which is possible for C)? In many ways, it's a
serious problem with C++ that the question doesn't have any
answers which would be really relevant here
Which is why I was so damn disappointed when I knew that the TR1
didn't even consider the ABIs. Truly a shame IMO.

Regards,
Fernando.
Jun 27 '08 #5
On 2008-05-15 14:06, Juha Nieminen wrote:
James Kanze wrote:
>And it's a constant source of discussion: why
can't I link code compiled with Borland with code compiled with
Microsoft (which is possible for C)?

A standardized ABI would allow even more than that. For example, it
would allow linking object files created by compilers of different
languages into the binary (such as for example object files created by a
pascal compiler).

Btw, isn't the .NET framework some kind of attempt to do exactly that,
ie. being able to call libraries made in any language from another language?
Kind of, the idea behind .Net is that you "compile" code in different
languages into a standardised byte-code format (the Common Intermediate
Language), This allows you to link to any other module compiled to the
CIL. Unfortunately the CIL is quite high-level and many existing
languages (such as C++) can not be accurately translated to CIL which is
why you get .Net versions of those languages (like C++/CLI).

--
Erik Wikström
Jun 27 '08 #6
On May 15, 6:43 pm, Fernando Gómez <fernando.a.gom e...@gmail.com>
wrote:
And it's a constant source of discussion: why
can't I link code compiled with Borland with code compiled with
Microsoft (which is possible for C)? In many ways, it's a
serious problem with C++ that the question doesn't have any
answers which would be really relevant here
Which is why I was so damn disappointed when I knew that the TR1
didn't even consider the ABIs. Truly a shame IMO.
The reason is simple: any API must be platform specific (at
least given current technology). There's no way code that I
compile on my Sun Sparc can be made to run on a PC. Thus,
languages which don't depend on a virtual machine can't define
a standard API. For that matter, even languages like Java,
which do define one (through JVM), tend to consider it separate
from the language standard: the specification of the Java
language doesn't specify an API, and the specification of JVM
doesn't specify the language used to compile to it.

As has been frequently pointed out, JVM is actually a platform,
like Windows on a PC. And it is the platform which should
define the API (which should apply to all of the programming
languages on the platform). The current situation is that most
platforms do define an API, but without many of the elements
needed for C++. So each compiler extends the platform API in a
different way. If I use C or Fortran, I can link code compiled
with the Sun compiler with code compiled with the GNU compiler.
If I use C++ (or Ada, I think), I can't. The problem isn't with
the C++ or Ada language standard, but with Sun's standard for
Solaris.

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #7
On May 15, 2:06 pm, Juha Nieminen <nos...@thanks. invalidwrote:
James Kanze wrote:
And it's a constant source of discussion: why
can't I link code compiled with Borland with code compiled with
Microsoft (which is possible for C)?
A standardized ABI would allow even more than that. For
example, it would allow linking object files created by
compilers of different languages into the binary (such as for
example object files created by a pascal compiler).
Up to a point. The supported types still have to be more or
less the same: you won't be able to pass BCD from Cobol to C++,
nor a C++ class to C, and expect it to work right.
Btw, isn't the .NET framework some kind of attempt to do
exactly that, ie. being able to call libraries made in any
language from another language?
An API depends on the platform. I'm not too familiar with .NET,
but I think it's something along the lines of JVM: a "platform"
designed to be easily and efficiently emulated on a variety of
hardware platforms. (Unlike JVM, on the other hand, I think it
does try to take a number of different languages into
consideration.)

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Jun 27 '08 #8
And it's a constant source of discussion: why
can't I link code compiled with Borland with code compiled with
Microsoft (which is possible for C)? In many ways, it's a
serious problem with C++ that the question doesn't have any
answers which would be really relevant here
Which is why I was so damn disappointed when I knew that the TR1
didn't even consider the ABIs. Truly a shame IMO.

The reason is simple: any API must be platform specific (at
least given current technology). There's no way code that I
compile on my Sun Sparc can be made to run on a PC. Thus,
languages which don't depend on a virtual machine can't define
a standard API. For that matter, even languages like Java,
which do define one (through JVM), tend to consider it separate
from the language standard: the specification of the Java
language doesn't specify an API, and the specification of JVM
doesn't specify the language used to compile to it.

As has been frequently pointed out, JVM is actually a platform,
like Windows on a PC. And it is the platform which should
define the API (which should apply to all of the programming
languages on the platform). The current situation is that most
platforms do define an API, but without many of the elements
needed for C++. So each compiler extends the platform API in a
different way. If I use C or Fortran, I can link code compiled
with the Sun compiler with code compiled with the GNU compiler.
If I use C++ (or Ada, I think), I can't. The problem isn't with
the C++ or Ada language standard, but with Sun's standard for
Solaris.
But AFAIK, C does define an ABI.

I don't actually notice what the API has to do with the ABI, or why an
ABI has to be plataform specific.

Regards,
Fernando.
Jun 27 '08 #9
I don't actually notice what the API has to do with the ABI,
or why an ABI has to be plataform specific.

Well, the ABI for C on a Sparc, under Solaris, says that the
first five arguments go into the registers o0-o4, at least if
they are int's or pointers. That's going to be a little bit
hard to implement on an Intel, which doesn't have as many
registers (and above all, doesn't manage them at all in the same
manner).
Ok, I think then that I had a wrong concept of an ABI. I thought it
was all about mangling and calling conventions.
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
1882
by: Steven T. Hatton | last post by:
I was skimming through the GCC documentation and came across the use of the TLA "ABI". They were using the expression as if I should know what it is. I therefore ran a google search and found the link below. It's an 'abstract binary interface', which sounds like a fancy way of saying abstraction layer. I haven't had a chance to read much of the literature, but it looked important enough to mention. It looks as though there are...
10
1818
by: Koen | last post by:
Hi! Does anyone know what the standard says about the way unions are stored in C? I mean the following: Let's say you have a union with a double and a char field: union MyUnion_t { double Double;
16
2308
by: aarklon | last post by:
Hi folks, recently i read the book named assembly language step by step by Jeff Duntemann. in the chapter coding for linux, he has got a paragraph named C calling conventions, which he describes as follows 1)
0
492
by: Mandy.Lialie | last post by:
Hi, I have search it for quite a long time. But I still can't get it. When I attempt to install yum and others, it always embarrasses me. It says python(abi) = 2.4 is need. I have version 2.4 at first. But have a try version 2.5, remove 2.4. Both work well, and do well with wx. OS: FC5 THX.
2
1841
by: Ernesto Bascón | last post by:
Hi: I've read some about the pimpl idiom and I know that it provides safe ABI backward compatibility on shared libraries. Let's consider the following definitions: template <class T> class A {
1
10327
by: Ioannis Vranos | last post by:
OS: Scientific Linux 4.4 (http://www.scientificlinux.org) which is a Red Hat Enterprise Linux 4 derivative (http://www.redhat.com/rhel/), like CentOS (http://www.centos.org), White Box Linux (http://www.whiteboxlinux.org) etc. Python version built and installed from sources: 2.4.4. I am trying to install BitTorrent 5.0 prerequisites, and when I am trying to install wxPython-common-gtk2-unicode-2.6.3.3-fc4_py2.4.i386.rpm, I am getting...
10
2683
by: Chimanrao | last post by:
hi, This is what I am trying to do: I am writing program for a OS called Symbian, which uses the gcc compiler. I have the following piece of code class MyAllocator {
13
2285
by: Anonymous | last post by:
On MS site: http://msdn2.microsoft.com/en-us/library/esew7y1w(VS.80).aspx is the following garbled rambling: "You can avoid exporting classes by defining a DLL that defines a class with virtual functions, and functions you can call to instantiate and delete objects of the type. You can then just call virtual functions on the type."
2
2140
by: Vinay Gudur | last post by:
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....
0
9551
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10274
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10251
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7576
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2945
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.