标签:blog http ar sp 文件 on 2014 log size
点击解决方案中的项目,右键属性,常规配置类型选择DLL
//.h文件 #include<stdlib.h> extern "C" __declspec(dllexport) int __stdcall funs(int a,int b); <pre name="code" class="cpp"><pre name="code" class="cpp">//.cpp文件
#include "DLL.h" extern "C" __declspec(dllexport) int __stdcall funs(int a,int b) { printf("%d %d",a,b); return a+b; } <pre name="code" class="cpp">//调用方法 #include "DLL.h" #include <string> #pragma comment (lib,"BBCC.lib") int main() { int a = funs(12,65); getchar(); return 0; }
<pre name="code" class="cpp">extern "C"去掉
标签:blog http ar sp 文件 on 2014 log size
原文地址:http://blog.csdn.net/u012454516/article/details/40681811