16,472
社区成员
发帖
与我相关
我的任务
分享
#ifdef TESTDLL_API
#else
#define TESTDLL_API _declspec(dllimport)
#endif
TESTDLL_API int add(int a, int b);
TESTDLL_API int subtract(int a, int b);
#define TESTDLL_API _declspec(dllexport)
#include "TestDll.h"
TESTDLL_API int add(int a, int b)
{
return a + b;
}
TESTDLL_API int subtract(int a, int b)
{
return a - b;
}
#include "..\TestDll\TestDll.h"
#include <iostream.h>
void main()
{
cout<<add(10, 10)<<'\n';
cout<<subtract(29, 15)<<'\n';
}