_USRDLL _AFXDLL _WINDLL 三种dll编译宏的具体含义

常见的编译参数VC建立项目时总会定义"Win32"。控制台程序会定义"_CONSOLE",否则会定义"_WINDOWS"。Debug版定义"_DEBUG",Release版定义"NDEBUG"
  与MFC DLL有关的编译常数包括:
  _WINDLL 表示要做一个用到MFC的DLL
  _USRDLL 表示做一个用户DLL(相对MFC扩展DLL而言)
  _AFXDLL 表示使用MFC动态链接库的 regular DLL
  _AFXEXT 表示要做一个MFC扩展DLL
  所以:
  Regular, statically linked to MFC _WINDLL,_USRDLL
  Regular, using the shared MFC DLL _WINDLL,_USRDLL,_AFXDLL
  Extension DLL _WINDLL,_AFXDLL,_AFXEXT

 

 

Building Your DLL

 

When compiling regular DLLs that statically link to MFC, the symbols "_USRDLL" and "_WINDLL" must be defined. Your DLL code must also be compiled with the following compiler switches:

•/D_WINDLL      signifies the compilation is for a DLL
•/D_USRDLL      specifies you are building a regular DLL

 

When compiling regularDLLs that statically link to MFC, the symbols "_USR DLL" and"_WINDLL" must be defined. Your DLL code must also be compile 

  • 4
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值