What exactly do I lose when using extern "C" in C++?

This question already has an answer here:

  • What is the effect of extern “C” in C++? 12 answers

  • The only thing that gets dropped is name mangling of externally visible names. Function overloading by parameter types, as well as by parameter count, stop working as the result. Essentially, name resolution during the linking phase goes back to the plain old C mode (ie one name - one entry).

    As far as the internals of your implementation go, you can continue using the standard library and all the other nice features of C++11. Only the names of externally visible entities get changed by extern C .

    链接地址: http://www.djcxy.com/p/40482.html

    上一篇: extern“C”和extern之间的区别

    下一篇: 在C ++中使用extern“C”时会丢失什么?