究竟什么extern "C"放入C++代码呢?
extern "C"
例如:
extern "C" { void foo(); }
c c++ name-mangling linkage extern-c
为什么我们需要使用:
extern "C" { #include <foo.h> }
特别:
我们什么时候应该使用它?
在编译器/链接器级别发生了什么,需要我们使用它?
如何在编译/链接方面解决了需要我们使用它的问题?
c++ name-mangling linkage extern-c
c++ ×2
extern-c ×2
linkage ×2
name-mangling ×2
c ×1