dll例子 写的对不对?
各位大虾 帮我看看 对不对?
//dll2.h
#ifndef DLL2_H
#define DLL2_H
#if defined DLL2_EXPORTS
#define API_EXPORT _declspec(dllexport)
#else
#define API_EXPORT _declspec(dllimport)
#endif
API_EXPORT int add(int x,int y);
#endif
//dll2.cpp
#include "dll2.h"
int add(int x,int y){
return x+y;
}