在VS2013中创建了一个空项目,创建了MyApp.h, MyApp.cpp(MyApp.h使用了<afxwin.h>)

build的时候报错:

fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

解决办法:

项目>项目属性>配置属性>常规>MFC的使用:根据需求选择"在静态库中使用MFC"或者"在共享DLL中使用MFC"

再build,继续报错:

error MSB8031: Building an MFC project for a non-Unicode character set is deprecated. You must change the project property to Unicode or download an additional library.

解决办法:

项目>项目属性>配置属性>常规>字符集:选择“使用Unicode字符集”

从“空项目”创建MFC项目遇到的问题error C1189,error MSB8031的更多相关文章

  1. fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>

    给对话框添加类, 报错 CalibrateMFCDlg.h(6) : error C2504: “CDialog”: 未定义基类 等多个错误 加上 #include "afxwin.h&qu ...

  2. fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC

    出现如下错误: fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires ...

  3. fatal error C1189: #error : Building MFC application with /MD[d] (CRT dll version) requires MFC sha

    调试程序时出现以下问题:d:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afx.h(24): fatal e ...

  4. error C2065: “CString”: 未声明的标识符 ;fatal error C1189: #error : afxstr.h can only be used in MFC proje

    转自VC错误:http://www.vcerror.com/?p=1388 问题描述: error C2065: "CString": 未声明的标识符 fatal error C1 ...

  5. vc/atlmfc/include/afx.h(24) : fatal error C1189: #error : Building MFC application with /MD[d] (CRT

    环境:win7,64位,vs2012 1> c:/program files/microsoft visual studio 8/vc/atlmfc/include/afx.h(24) : fa ...

  6. Win32控制台、Win32项目、MFC项目、CLR控制台、CLR空项目、空项目区别

    转载:https://blog.csdn.net/zfmss/article/details/79244696 1.Win32控制台 初始代码模版以main为程序入口,默认情况下,只链接C++运行时库 ...

  7. MVC项目创建与项目结构介绍

    一.创建MVC项目 打开VS202,点击:文件—>新建—>项目—>Web—>Asp.Net MVC 4 Web应用程序 填好项目名称.解决方案名称和文件存放位置,然后点击确定, ...

  8. Eclipse apk项目创建和项目构架

    一.创建项目工程 设定名字 设定包名(每一台机器只有唯一的包名)下一步 根据设置进行选择 创建空项目 Finish即可创建 调节项目的字体 二.Eclipse 项目构架 Src 2. Gen R.ja ...

  9. 用Eclipse+ADT创建可运行项目,创建lib项目,引用一个lib项目

    Managing Projects from Eclipse with ADT In this document Creating an Android Project  创建可运行项目 Settin ...

随机推荐

  1. 如何移植openwrt系统

    Cisco/Linksys在2003年发布了WRT54G这款无线路由器,同年有人发现它的IOS是基于Linux的,然而Linux是基于GPL许可证发布的,按照该许可证Cisco应该把WRT54G的IO ...

  2. -bash: ./xxx.sh: /bin/bash^M: bad interpreter: No such file or directory

    问题的原因是在windows下编辑然后上传到linux系统里执行的..sh文件的格式为dos格式.而linux只能执行格式为unix格式的脚本. 不要使用记事本编辑,使用代码编辑器可以正常执行

  3. (转)一个非常好的akka教程

    akka系列文章目录 akka学习教程(十四) akka分布式实战 akka学习教程(十三) akka分布式 akka学习教程(十二) Spring与Akka的集成 akka学习教程(十一) akka ...

  4. Ext3.0中复杂表头样例

    注意要点:不出现滚动栏时要设置height和forceFit : false 效果例如以下图: this.columns = [{ header : '月份', dataIndex : '月份', w ...

  5. C语言 域名通配符实现

    本例实现通配符 * 的功能,不支持*在字符串的末尾, 仅提供思路,函数仅做简单单元测试. 如有使用,还请自己进行修改 // str1: 待匹配字符串 // str2: 带通配符字串 int wildc ...

  6. 改善C#程序的建议2:C#中dynamic的正确用法

    dynamic是FrameWork4.0的新特性.dynamic的出现让C#具有了弱语言类型的特性.编译器在编译的时候不再对类型进行检查,编译期默认dynamic对象支持你想要的任何特性.比如,即使你 ...

  7. android判断服务是否是运行状态

    /** * 判断服务是否处于运行状态. * @param servicename * @param context * @return */ public static boolean isServi ...

  8. JavaWeb request对象常用操作

      JavaWeb request对象常用操作 CreateTime--2018年6月1日16点47分 Author:Marydon 一.前提 import javax.servlet.http.Ht ...

  9. js实现同时提交多个表单

    http://www.jb51.net/article/17284.htm 两种方法: 1.使用ajax异步提交表单.方法简单,jQuery插件等都能实现. 2.使用iframe.方法很原始,较麻烦. ...

  10. 移动UI设计中需要避免的四种常见用户体验误区

    2012年移动应用的下载量超过300 亿,可是智能手机用户平均每周会使用的应用数却大概只有15个.更糟的是,Localytics 的研究表明,大概有22%的应用是见光死,用过一次之后就被束之高阁.既然 ...