【发布时间】:2010-02-20 07:43:32
【问题描述】:
#ifndef _DLL_TUTORIAL_H_
#define _DLL_TUTORIAL_H_
#include <iostream>
#if defined DLL_EXPORT
#define DECLDIR __declspec(dllexport)
#else
#define DECLDIR __declspec(dllimport)
#endif
extern "C"
{
DECLDIR int Add( int a, int b );
DECLDIR void Function( void );
}
#endif
代码DECLDIR __declspec(dllexport) 的真正作用是什么?
【问题讨论】:
-
@deepak:欢迎来到
StackOverflow!我格式化了您的代码(选择它并按 Ctrl+K)。