dll导出函数问题

gooore gooore 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

请教怎么将下面这个导出类,整形变量,和一个函数写成一个def文件?


// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the WINAPI_DLL_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// WINAPI_DLL_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef WINAPI_DLL_EXPORTS
#define WINAPI_DLL_API __declspec(dllexport)
#else
#define WINAPI_DLL_API __declspec(dllimport)
#endif

// This class is exported from the WinAPI_DLL.dll
class WINAPI_DLL_API CWinAPI_DLL {
public:
CWinAPI_DLL(void);
// TODO: add your methods here.
};

extern WINAPI_DLL_API int nWinAPI_DLL;

WINAPI_DLL_API int fnWinAPI_DLL(void);


...全文
评论 9
收藏 已收藏
分享
返回顶部
gooore
VC/MFC 16,550 成员 421,606 内容