好像有个什么隐式调用方法和显示调用方法好我我有个MYDLL.h文件
:extern "C" __declspec(dllexport) int sum(int a,int b);
MYDLL.cpp文件如下:
#include "MYDLL.h"
int sum(int a,int b){
int result=a+b;
return result;
}
:extern "C" __declspec(dllexport) int sum(int a,int b);
MYDLL.cpp文件如下:
#include "MYDLL.h"
int sum(int a,int b){
int result=a+b;
return result;
}
前者用#pragma comment(lib,"xxx"),放在stdafx.h里面
后者用LoadLibrary();可以放在程序代码里面