3 ms·
A nitpick: please don't conflate C and C++. They're separate languages, this article is exclusively about C, and C++ is an instance of one of the languages th
by wheels 4y ago
A nitpick: please don't conflate C and C++. They're separate languages, this article is exclusively about C, and C++ is an instance of one of the languages that "speaks C". C++ has its own symbol mangling and ABI, which has not historically been nearly as stable or universal.
- fsckboy 4y agohe didn't conflate C and C++, he included C++ because, as you suggest, C++ can speak C, including C ABI.
- wheels 4y agoVirtually every language has a mode to make calls into the C ABI. That's exactly the point of the article. To switch in to C ABI mode in C++ you have to wrap the declarations in 'extern "C" { ... }' blocks, otherwise you get the C++ ABI, not the C ABI. It's done similarly in many other languages.