Hacker News new | ask | show | jobs
by seanbax 1239 days ago
I'd like to target Windows. Windows does impose a specific C++ ABI, but it's completely undocumented. It's really just whatever Visual C++ does. C++ ABI is very complex, especially vtable layout and RTTI and EH. I am looking to get Microsoft's assistance on targeting Windows. It's a priority, but they don't want to help yet.
1 comments

Isn't that what com is for? Win32 is compiler agnostic.
https://itanium-cxx-abi.github.io/cxx-abi/abi.html See all the stuff there? exceptions, vtable layout, rtti, mangling, etc. There's a Windows equivalent for all of that. That's what I want access to.
Right I know what a C++ ABI is but I still don't get it. To write C++ apps on Linux you need to match the ABI because there are lots of raw libraries that are just straight compiled C++. On Windows it's not like that outside of the VC++ runtime itself. Everything is C APIs or COM, and wrappers around that. MS never documented their C++ ABI because as far as they're concerned it's not something anyone needs to know, in order to write Windows apps or have components/libraries interop with each other. They never expose raw C++ objects in Windows. When they have C++ APIs they come as source or headers.