- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我尝试向项目添加自定义图标(13x13 尺寸)。
我找不到为什么我无法加载图标。
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的一些信息:
#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
通用.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
文件2.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.hVisual Studio C++ 2010, Windows XP
最佳答案
我遇到了同样的问题。看起来不可能合并.rc
。文件,如果它们都有图标。尽管您可能拥有非重叠编号方案。
请参阅以下 Microsoft 的解释:Gary Chang 已发布此 interesting explanation网络上的其他地方:
The following is more detail info on the root cause of this problem: "Basically what's happening is that Icon resources are composed of two different Win32 resource types
C RT_GROUP_ICON
andRT_ICON
. You can think ofRT_GROUP_ICON
as a directory ofRT_ICON
resources. TheRT_ICON
resources are the actual icon images.The VC resource editor tries to simplify this for you in a single icon resource entity and under the hood handles some things like creation and ID naming of the individual
RT_ICON
resources (the #1 you're seeing in this case). The VC resource editor was also created back in the day when it was only possible to have a single.rc
file in a given.exe
or.dll
. Changes have since been made in the command line tools to allow use of multiple .rc files to contribute to a given.exe
or.dll
but I don't believe the resource editor implementation was ever revisited with this new possibility in mind, at least from the standpoint of the way it handles icons.So with the current VC++ compiler,the only thing that can be done in this case if you want to have multiple resource files is to keep all icon (and cursor) resources in a single
.rc
file. That will let the VC resource editor keep all theRT_ICON
identifiers unique."Wish this helps and thanks for your understanding! Best regards,
Gary Chang Microsoft Community Support
关于c++ - fatal error CVT1100 : duplicate resource. 类型 :ICON, 名称 :1 (C++, Visual Studio C++ 2010),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31323596/
我正在开发一个 Android 项目,其中有一个抽屉导航,其中显示了 GroupSection 对象的列表。所有 GroupSection 对象都包含一个部分图标。抽屉图标由 TypedArray 和
$('a[class*=icon-]').append(""); 使用我现在拥有的代码,我可以转动: 进入 但我想将选定的类“icon-edit”附加到跨度类中。因为我想要这样的东西: var
我正在建立一个网站,我希望在视觉上有一排字体很棒的图标看起来具有相同的高度。这也意味着我希望他们都坐在同一基线上。 由于图标的性质是具有不同纵横比的不同形状,当您将具有相同字体大小或 fa-2x(等)
我有两个图标,其中一个图标为 .gif,另一个图标为 .png。所以我想组合这些图标,将动画图标放在另一个图标之上。 此代码适用于静态图标,但在放置动画图标时,它不会打印动画。 public clas
当我在控制台中运行 gatsby develop 时,会出现此错误: ERROR #11331 PLUGIN Invalid plugin options for "gatsby-plugin-ma
在适用于iPhone的iOS 7上,有一个新的应用程序图标大小:120x120。我使用此尺寸来创建iOS 7专用图标。在iOS 6上,它将自动采用“旧” 114x114图标,在iOS 7上,它将采用新
我的简单问题是:是否可以将图标组件内的文本居中,我尝试像 child 一样传递文本,但它不起作用?还有其他解决方案吗?我知道可能的解决方案是使用 position: 'absolute' 但还有其他方
我有这个代码: if(seatE1.getIcon() == particular icon) { // do something } 我不知道在特定图标中写什么。我应该写我想要的图标的路径还
在调用 System.Drawing.Icon.ToBitmap() 创建图像后,是否可以安全地处理原始 Icon? 最佳答案 该方法将 Icon 转换为新的 Bitmap 对象,因此不会有从 Bit
这个图钉图标的名称是什么? 最佳答案 现在 Material Icon 中提供了准确的图标。 图标名称:push_pin 图标网址:https://material.io/resources/icon
数据如下: df % ggplot(aes(label = parts, values = values)) + geom_pictogram(n_rows = 10, aes(color =
我正在为 VSCode 编写扩展。在 WebviewPanel 中,我需要显示来自文件图标主题的文件扩展名图标。是否有从文件图标主题中获取图标的功能? 最佳答案 我也在研究这个。我还没有答案,但到目前
我正在组装一个通用应用程序,并且我的项目中有图标,但是我不断从编译器收到关于Icon.png的警告。 我按照http://developer.apple.com/library/ios/#qa/qa2
我正在组装一个通用应用程序,并且我的项目中有图标,但是我不断从编译器收到有关Icon.png的警告。 我按照http://developer.apple.com/library/ios/#qa/qa2
我下载了“Office 2010 Add-In: Icons Gallery ”,这是一个 docx 文件,其中有两个包含图标的后台选项卡。 如何提取图标或在我的应用程序中使用它们? 最佳答案 我在
我正在开发一个 MacOS 应用程序,该应用程序应显示应用程序图标。对于某些应用程序,它可以工作,对于某些应用程序,它不能。 Notes.app 是我没有获得应用程序图标图像的应用程序。 let ic
我只是在Android Studio中创建了一个模板项目,我没有更改一行代码(DrawerLayout模板项目)。 但是,我发现用于显示导航 fragment 的单击图标始终是向左箭头,即使在代码中它
我正在尝试找出如何使用 xpath 通配符来获取网站图标: $doc = new DOMDocument(); $doc->strictErrorChecking = FALSE; $doc->loa
Mobile Safari对于比传统 16x16 分辨率更高的图标,需要使用以下咒语: 但是,Firefox 需要使用 HTML5 syntax ,例如: 现在,我的期望是可以将它们组合成一行
我目前为动态创建的 QPushButton 使用以下样式表属性 string mystyle = "QPushButton { border: 1px solid #8f8f91; border-
我是一名优秀的程序员,十分优秀!