zoukankan      html  css  js  c++  java
  • win32程序中简单应用mfc

    今日写程序在win32中用CRect发现报错,突然想起来。要引入mfc库。想重新建立一个工程添加对mfc的支持。发现选项不能选。查资料后发现。

    在win32程序中简单应用mfc库,只需要简单的引入<afx.h>就好了。注意这个时候如果出来

    #ifdef _DLL
    #ifndef _AFXDLL
    #error Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]
    #endif
    #endif

    这个错误。只需要把use of mfc改为Use MFC in a Shared DLL就可以了。

    当然<windows.h>头文件在mfc中已经包含所以去掉。

  • 相关阅读:
    每日总结59
    每日总结58
    每日总结57
    每日总结56
    每日总结55
    每日总结54
    每日总结53
    每日总结52
    学习日报
    学习日报
  • 原文地址:https://www.cnblogs.com/suncoolcat/p/3357947.html
Copyright © 2011-2022 走看看