On C++ ABI

I think that every one know how is difficult write a shared library in C++ that works across different compilers. This is due the fact that C++ (and C) doesn't have a standard ABI.

C++ has no standard ABI for performance reason. But why in so long times we haven't yet some pseudo-standard ABI. For example an ABI for x86 platform, an ABI fo atom, an ABI for x64 and so on?

I think that one major limitation of this beautiful programming is the impossibility to write modules.

If modules will be approved in a future version of the standard unfortunately the ABI incompatibility issue will remain across different compiler.
closed account (S6k9GNh0)
I don't understand your point and I think you're incorrect on certain things.

There's very good reason why the ABI is not standardized. Contrary to popular belief, the ABI for C is also not standardized. It's just assumed that there is no symbol mangling which keeps things simple (but also prevents function name reuse, perhaps a good thing).

You can write modules in C++. Hell, you can write modules in D, Haskell, and various other languages people will otherwise tell you that you cannot. It simply has to export C-style symbols (literally the only requirement).
Last edited on
Topic archived. No new replies allowed.