Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在centos 6上使用gnu c编译器,c程序动态加载代码中的共享库。
您必须声明您的函数在 C 中可用:
extern "C" void foo(int x, char y);
请注意,您不能进行重载或 C++ 提供的任何其他功能。(这是因为名称修饰。)