致命错误CVT1100:重复资源。类型:ICON,名称:1(C ++,Visual Studio C ++ 2010) [英] fatal error CVT1100: duplicate resource. type:ICON, name:1 (C++, Visual Studio C++ 2010)

查看:2511
本文介绍了致命错误CVT1100:重复资源。类型:ICON,名称:1(C ++,Visual Studio C ++ 2010)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试将自定义图标(13x13维度)添加到项目中。

I tried to add custom icons (13x13 dimention) to a project.

我找不到为什么我无法加载图标。

I cannot find why I cannot load icon.


CVTRES:致命错误CVT1100:重复资源。类型:ICON,名称:1,
语言:0x0409链接:致命错误LNK1123:转换期间失败
到COFF:文件无效或损坏

CVTRES : fatal error CVT1100: duplicate resource. type:ICON, name:1, language:0x0409 LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

来自resource.h的一些信息:

Some information from 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:

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,没有帮助。

I tried to change the id of the IDI_TERRAIN and other icons, did not help.

据此:
https:// msdn。 microsoft.com/en-us/library/b1kw34cb%28v=vs.80%29.aspx
我试图更改号码,没有帮助

According this: https://msdn.microsoft.com/en-us/library/b1kw34cb%28v=vs.80%29.aspx I tried to change the number, did not help

请注意,如果我注释掉有问题的行,则会加载IDI_LOGO。
任何帮助?

Note that if I comment out the problematic lines, IDI_LOGO is loaded. Any help?

错误在resource.h
Visual Studio C ++ 2010,Windows XP

The error is in resource.h Visual Studio C++ 2010, Windows XP

推荐答案

我解决了这个问题。

我已将一个.rc文件的内容移动到主rc文件中。编译器有两个资源包含ICON的问题。我不明白为什么,但这是一个清晰而简单的解决方案。

I have moved content of one .rc file to main rc file. The compiler had problem to include ICONs from two resources. I have no idea why but this is clear and simple solution.

这篇关于致命错误CVT1100:重复资源。类型:ICON,名称:1(C ++,Visual Studio C ++ 2010)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆