Resolving CVT1100

by Codewiz51 8. January 2012 09:19

If you work with message files in your C++ project, you may have encountered the following error:

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

I wrestled with this error recently, and for nearly 12 hours, it drove me crazy.  There is a lot of speculation on the internet regarding this error, with lots of "try this or that"

Here is a concrete solution to my problem:

  • I had included the message.rc file in my C++ project, along with the project's .rc file.
  • The message.rc file is also listed as an included resource in the project's .rc file.
  • Solution: Remove the message.rc file from your project, but leave it as an included resource in your project's .rc file.
  • Reason: The resource compiler dutifully includes the message.rc.  The linker then dutifully tries to link in the compiled message.res file included in the project; ergo, duplicate resource!
  • If you are going to include the message.rc as a resource in another .rc file, then you should not add message.rc to your solution.

Put this down as a hard lesson learned.  How hope my experience aids another developer.

Tags: , , ,

Programming

Comments are closed

Disclaimer

This blog represents my personal hobby, observations and views. It does not represent the views of my employer, clients, especially my wife, children, in-laws, clergy, the dog, the cat or my daughter's horse. In fact, I am not even sure it represents my views when I take the time to reread postings.  So, take most of what I say with a grain of salt.

© Copyright 2008-2014