I tried to add custom icons (13x13 dimention) to a project.
I cannot find why I cannot load icon.
CVTRES : fatal error CVT1100: duplicate reso
I ran into the same issue. Looks like it is impossible to merge .rc
. files if they both have icons. Despite the non-overlapping numbering scheme you might have.
See below explanation from Microsoft: Gary Chang has posted this interesting explanation elsewhere on the net:
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
I Solved the problem.
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.