用Visual Studio2015 编译时,遇到如下编译错误:

error C2220: warning treated as error - no 'object' file generated

warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss

大概意思就是这个文件使用了non-Unicode编码,不能正确被编译器解析,导致编译出错。

解决方法:

到Windows 操作系统的Control Panel->Region 中把"Current language for non-Unicode programs:" 设置成 "English (United States)" 就能解决问题 (原来设置的是中文,编译器会解析错误)。

PS: 网上其他有一些解决方法:把文件改成Unicode编码(不适合我,我有几百个文件。。。)

error C2220: warning treated as error - no 'object' file generated warning C4819: The file contains a character that cannot be represented in the current code page (936).的更多相关文章

  1. 怎样处理“error C2220: warning treated as error - no object file generated”错误

    最近用VS2010 编译ceflib开源库是出现"怎样处理"error C2220: warning treated as error - no object file gener ...

  2. error C2220: warning treated as error - no 'object' file generated解决方法

    error C2220: warning treated as error - no 'object' file generated 警讯视为错误 - 生成的对象文件 / WX告诉编译器将所有警告视为 ...

  3. wince6.0 编译报错:"error C2220: warning treated as error - no 'object' file generated"的解决办法

    内容提要:wince6.0编译报错:"error C2220: warning treated as error - no 'object' file generated" 原因是 ...

  4. Caffe RPN :error C2220: warning treated as error - no 'object' file generated

    在 caffe里面添加rpn_layer.cpp之后,总是出现 error C2220: warning treated as error - no 'object' file generated 这 ...

  5. error C2220: warning treated as error - no object file generated的处理方法

    WDK/DDK中掉 error C2220: warning treated as error - no 'object' file generated 2009-04-01 15:54 网上搜索而来 ...

  6. WINCE6.0 error C2220: warning treated as error问题解决

    今天在编译IMX515的BSP的时候,发现下面的编译错误问题: BUILD: [00:0000002476:PROGC ] BuildingCOMPILE Pass in F:\WINCE600\PL ...

  7. return Acad::ErrorStatus::eOk引发error C2220: warning treated as error - no 'object' file generated

    必须先Acad::ErrorStatus es; 然后return es. 补充: 如果把cpp中#include "*.h"和#include"stdafx.h&quo ...

  8. 编译 openssl 0.9.8zc 出现 error C2220: warning treated as error - no 'object' file generated

    remove the /WX option from CFLAG

  9. error C2220: 警告被视为错误 - 没有生成“object”文件

    原文:error C2220: 警告被视为错误 - 没有生成"object"文件 这种错误的原因是:原因是该文件的代码页为英文,而我们系统中的代码页为中文.   解决方案: 1. ...

随机推荐

  1. linux系统常用日志

    系统日志记录着系统运行中的记录信息,在服务或者系统发生故障的时候,通过查询系统日志,可以帮助我们诊断.系统日志可以预警安全问题,系统日志一般都存放在/var/log目录下 /var/log/dmesg ...

  2. 【Codeforces Round #427 (Div. 2) C】Star sky

    [Link]:http://codeforces.com/contest/835/problem/C [Description] 给你n个星星的坐标(xi,yi); 第i个星星在第t秒,闪烁值变为(s ...

  3. listview-fading 滚动条样式设置

    fadingEdge-属性用来设置拉滚动条时 ,边框渐变的方向.它有三个属性值可以设置 none:(边框颜色不变) horizontal:(水平方向颜色变淡) vertical:(垂直方向颜色变淡). ...

  4. node----ajax请求太大报错------解决方法

    //----分析主体程序var bodyParser = require(‘body-parser‘); app.use(bodyParser.json({limit: ‘50mb‘})); app. ...

  5. 深入了解Linux远程桌面

    本文转载于:http://www.linux521.com/2009/system/201004/11001.html 已发表在<网管员世界>2010年3月杂志             本 ...

  6. Java 批量修改文件后缀

    import java.io.*; public class test { public void reName(String path, String from, String to) { File ...

  7. BZOJ2434: [Noi2011]阿狸的打字机(fail树+dfs序)

    Description 阿狸喜欢收藏各种稀奇古怪的东西,最近他淘到一台老式的打字机.打字机上只有28个按键,分别印有26个小写英文字母和'B'.'P'两个字母. 经阿狸研究发现,这个打字机是这样工作的 ...

  8. android对话框(Dialog)的使用方法

    Activities提供了一种方便管理的创建.保存.回复的对话框机制.比如 onCreateDialog(int), onPrepareDialog(int, Dialog), showDialog( ...

  9. textview-显示行数限制

    在代码中直接添加 android:maxLines="2" android:ellipsize="end" 跟ellipsize搭配使用,超过两行的时候,第二行 ...

  10. python中数据结构

    列表:数组,矩阵 元组 映射:字典 集合