VC linker error - CVT1100 duplicate resource. type:MESSAGETABLE

86 Views Asked by At

I have been given a very old project with a series of DLLs and drivers which has not been built since 2012. I'm trying to bring it back to life but as a driver guy I'm really struggling with some of this user mode resource stuff.

I get the following error -

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

The project has 1 .rc file which defines 3 icons and a VS_VERSION_INFO and it has one .mc file which has some messages. If I get rid of the .rc and just build it with the .mc I see the following two resources in the resulting binary:

--type=11 --name=1 --language=1033 [type=messagelist offset=0x1ee0a0 size=1452]
--type=24 --name=2 --language=1033 [offset=0x1ee650 size=381]

If I get rid of the .mc and just build it with the .rc then I see these resources:

--type=3 --name=1 --language=1033 [type=icon offset=0x1ee4f0 size=744]
--type=3 --name=2 --language=1033 [type=icon offset=0x1ee7f0 size=744]
--type=3 --name=3 --language=1033 [type=icon offset=0x1eeaf0 size=744]
--type=14 --name=101 --language=1033 [type=group_icon offset=0x1ee7d8 size=20]
--type=14 --name=102 --language=1033 [type=group_icon offset=0x1eead8 size=20]
--type=14 --name=103 --language=1033 [type=group_icon offset=0x1eedd8 size=20]
--type=16 --name=1 --language=1033 [type=version offset=0x1ee1f0 size=768]
--type=24 --name=2 --language=1033 [offset=0x1eedf0 size=381]

But if I try to include both I get the error. I don't understand what the conflict actually is since there is only one set of messages in the .mc and no messagetable in the .rc.

Any ideas on what I'm missing here?

1

There are 1 best solutions below

0
Jeff On

In the end the only thing I could figure out to get a .rc and an .mc to co-exist was to run mc on the foo.mc file to produce a new foo.rc. Then in the other .rc file, bar.rc, I used an include on foo.rc. If such a simple approach works I'm not sure why the build environment can't coordinate this on its own. But hopefully this helps somebody down the road!