error RC2103 : unexpected end of file in string literal
来源:互联网 发布:北京域名备案的时间 编辑:程序博客网 时间:2024/06/05 09:27
转载地址:http://heyunhuan513.blog.163.com/blog/static/1602042201072382932663/
使用MS2008做了一个MFC的一个小程序。添加了一个resource symbol后编译的时候就出现了这个错误
error RC2103 : unexpected end of file in string literal
之前无论怎么添加symbol都不会出现错误。不知道今晚是怎么了,只要我一添加在编译就错误。
出现问题就要找到问题,找不到问题今夜怎么能睡个好觉呢?
分析:
从备份出来的程序,编译不会出现问题。我只添加了一个bmp的symbol后。就出现了这个问题,起初怀疑是我文件的格式不对。后来换了一个原来加载过的bmp文件还是会出现问题。可以排除文件错误的问题。
源码的问题不可能。因为我只是添加了bmp文件,但是对bmp文件未作任何处理,不应该出现这样的问题。
双击:error RC2103 : unexpected end of file in string literal 这个错误信息后。提示test.rc文件已经被打开。关闭后弹出来test.rc内容。仔细浏览后,由于文件内容太多,太复杂,而且还不易发现错误。最后提取出来好用的和不好用的两个文件,使用UE进行对比。最终发现错误原因。修改后build OK。
解决办法:
1.打开*.rc文件。
2.查找到最后几行。
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
LANGUAGE 4, 2
#pragma code_page(936)
#include "res\test.rc2" // 非 Microsoft Visual C++ 编辑的资源
#include "afxres.rc" // 标准组件
#endif
1 TYPELIB "test.tlb
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
这个是出错的文件。
仔细查看 1 TYPELIB "test.tlb 发现少了一个"号 修改成1 TYPELIB "test.tlb"
编译后OK!
- error RC2103 : unexpected end of file in string literal
- Parse error: syntax error, unexpected end of file in
- fatal error C1071: unexpected end of file found in comment
- VS2012 error C1071: unexpected end of file found in comment
- fatal error C1010: unexpected end of file
- syntax error: unexpected end of file
- syntax error: unexpected end of file
- shell:syntax error:unexpected end of file
- syntax error: unexpected end of file解决方法
- syntax error:unexpected end of file
- syntax error: unexpected end of file
- syntax error, unexpected end of file
- unexpected end of file found in comment
- unexpected end of file found in comment
- Parse error: syntax error, unexpected end of file in ..\..\functions.php on line 1246
- php出现如下错误: Parse error: syntax error, unexpected end of file in
- php 报错 Parse error: syntax error, unexpected end of file in (路径)
- unexpected end of file
- oracle_最常见的 5 个导致节点重新启动、驱逐或 CRS 意外重启的问题
- Apache Camel框架集成Spring
- Linux线程属性及优先级设置
- Getting BeagleBone Started
- Apache Camel框架之Error handling
- error RC2103 : unexpected end of file in string literal
- iphone图片拉伸相关
- Apache Camel框架之HTTP路由
- Eclipse下J2ME开发环境的配置
- Apache Camel框架之FTP路由
- 数据结构——线性表(二)
- Servlet单实例以及线程安全小结
- Apache Camel框架之事务控制
- Apache Camel框架之Freemarker做数据转换