fatal error CVT1100: duplicate resource. type:ICON, name:1 (C++, Visual Studio C++ 2010)

后端 未结 2 2011
挽巷
挽巷 2021-01-20 05:15

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

相关标签:
2条回答
  • 2021-01-20 06:04

    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 and RT_ICON. You can think of RT_GROUP_ICON as a directory of RT_ICON resources. The RT_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 the RT_ICON identifiers unique."

    Wish this helps and thanks for your understanding! Best regards,

    Gary Chang Microsoft Community Support

    0 讨论(0)
  • 2021-01-20 06:07

    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.

    0 讨论(0)
提交回复
热议问题