c++ windows下declspec

一、declspec

#ifdef STATIC_LIBS
   #define DLL_API  static
#else
   #define DLL_API  __declspec (dllexport)
#endif

   __declspec(dllexport):
   将一个函数声名为导出函数,就是说这个函数要被其他程序调用,即作为DLL的一个对外函数接口。

posted @ 2013-11-11 12:39  z折腾  阅读(242)  评论(0编辑  收藏  举报