【发布时间】:2015-09-28 04:32:27
【问题描述】:
我尝试将自定义图标(13x13 尺寸)添加到项目中。
我找不到无法加载图标的原因。
CVTRES:致命错误 CVT1100:重复资源。类型:图标,名称:1, 语言:0x0409 链接:致命错误 LNK1123:转换失败 到 COFF:文件无效或损坏
resource.h 中的一些信息:
#define IDI_LOGO 16 //0x10 - no problem here
...
/* Bitmaps */
#define IDB_LOGO 200
#define IDB_GOOD 201
#define IDB_EVIL 202
/* Icons */
#define IDI_TERRAIN 90 // problem starts here
#define IDI_ELEV 91
#define IDI_DRAWREPLACE 92
#define IDI_DRAWFILL 93
#define IDI_DRAWBRUSH 94
common.rc:
#include "resource.h"
/* Bitmaps */ // no problem
#define IDB_LOGO 200
#define IDB_GOOD 201
#define IDB_EVIL 202
/* Icons */ // problem:
#define IDI_TERRAIN 90
#define IDI_ELEV 91
#define IDI_DRAWREPLACE 92
#define IDI_DRAWFILL 93
#define IDI_DRAWBRUSH 94
file2.rc:
#include "resource.h"
IDI_LOGO ICON DISCARDABLE "res/swgbts.ico"
#include "resource.h"
IDI_LOGO ICON DISCARDABLE "res/aokts.ico"
我试图改变IDI_TERRAIN和其他图标的id,没有帮助。
据此: https://msdn.microsoft.com/en-us/library/b1kw34cb%28v=vs.80%29.aspx 我尝试更改号码,没有帮助
请注意,如果我注释掉有问题的行,则会加载 IDI_LOGO。 有什么帮助吗?
错误在resource.h中 Visual Studio C++ 2010,Windows XP
【问题讨论】: