#ifdef DLL_API #else#define DLL_API extern "C" _declspec(dllimport) #endif DLL_API int _stdcall add( int a, int b); DLL_API int _stdcall subtract( int a, int b);
Dll.cpp
#define DLL_API extern "C" _declspec(dllexport) #include "Dll.h" #include <Windows.h> #include <stdio.h> int _stdcall add( int a, int b) { return a+b; } int _stdcall subtract( int a, int b) { return a-b; }