能不能在DLL中存放类以供其他程序使用?函数我知道可以,但类、变量等能不能存放在DLL中供其他程序使用呢?[解决办法]在源代码中使用编译器扩展extern __declspec(dllexport) int a=0;类就是class __declspec(dllexport) cls{};导出类就是导出类的方法和静态变量可以使用def文件来导出library dllnameexportsitem1item2..c++的导出要使用修饰名