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).
用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).的更多相关文章
- 怎样处理“error C2220: warning treated as error - no object file generated”错误
最近用VS2010 编译ceflib开源库是出现"怎样处理"error C2220: warning treated as error - no object file gener ...
- error C2220: warning treated as error - no 'object' file generated解决方法
error C2220: warning treated as error - no 'object' file generated 警讯视为错误 - 生成的对象文件 / WX告诉编译器将所有警告视为 ...
- wince6.0 编译报错:"error C2220: warning treated as error - no 'object' file generated"的解决办法
内容提要:wince6.0编译报错:"error C2220: warning treated as error - no 'object' file generated" 原因是 ...
- 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 这 ...
- 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 网上搜索而来 ...
- WINCE6.0 error C2220: warning treated as error问题解决
今天在编译IMX515的BSP的时候,发现下面的编译错误问题: BUILD: [00:0000002476:PROGC ] BuildingCOMPILE Pass in F:\WINCE600\PL ...
- 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 ...
- 编译 openssl 0.9.8zc 出现 error C2220: warning treated as error - no 'object' file generated
remove the /WX option from CFLAG
- error C2220: 警告被视为错误 - 没有生成“object”文件
原文:error C2220: 警告被视为错误 - 没有生成"object"文件 这种错误的原因是:原因是该文件的代码页为英文,而我们系统中的代码页为中文. 解决方案: 1. ...
随机推荐
- 数据库事务及其EF中如何处理事务
一.基础知识 1) 使用事务级别ReadUnCommited 会产生脏读现像,意味着读取到的为UnCommited(未提交)的数据.怎么理解呢?在使用该隔离级别的事务开始后.更新了数据 ...
- HDU 4107 Gangster
Gangster Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 4 ...
- Linux编译ffmpeg
Linux编译ffmpeg并转换MP3到AMR AMR格式是智能手机上的常用音频文件格式,比如MP3格式的压缩比大,但是文件比MP3小,所以在移动互联项目中应用比较广泛.去年年底协助联想研究院开发一款 ...
- Directx9.0 学习教程3 -图形学之创建点 线 三角形 等
1.首先 介绍点的表示方法 struct CUSTOMVERTEX { float x,y,z; }; CUSTOMVERTEX Vertices[] = { {-5.0, -5.0, 0.0}, { ...
- Android中的MVP架构初探
说来羞愧,MVP的架构模式已经在Android领域出现一两年了.可是到今天自己才開始Android领域中的MVP架构征程. 闲话不多说,開始吧. 一.架构演变概述 我记得我找第一份工作时,面试官问我& ...
- hdu 1533 Going Home 最小费用最大流 入门题
Going Home Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Tota ...
- 没有killall命令的解决方法
没有killall命令的解决方法 -bash: killall: command not found https://www.byte128.com/archives/231.html 执行killa ...
- home.pl 正在促销,一些域名免费(终止于2017.4.4)
home.pl 正在促销,一些域名免费(终止于2017.4.4) home.pl 成立于1997年,是波兰顶尖的互联网服务公司.专注于域名登记,托管网站,保持电子邮件帐户等. home.pl 正在促 ...
- js配合My97datepicker给日期添加天数
<input name="ctl00$ContentPlaceHolder1$txtTimeStart" type="text" value=" ...
- 19,tuple多元数组
#include <iostream> #include <tuple> using namespace std; void main() { char ch = 'a'; ; ...