Question

I'm trying to compile a Delphi 7 project that I've inherited, and I'm getting this error:

[Error] WARNING. Duplicate resource(s):
[Error] Type 2 (BITMAP), ID EDIT:
[Error] File C:[path shortened]\common\CRGrid.res resource kept; file c:\common\raptree.RES resource discarded.

It says warning, but it's actually an error - compilation does not complete.

It looks like two components - CRGrid and RapTree - are colliding somehow. Does anyone have any ideas on how to fix this?

Other than removing one of components from the project, of course.

Was it helpful?

Solution

Try firing up your resource editor (I'm pretty sure Delphi comes with one) and open the files. Check what bitmap resources are in the two, see which can be the duplicate.

If you need to keep both resources, you need to renumber one of them.

OTHER TIPS

You'll need to go into the components and rename one of the resources and then update the component code to use the new name. It's a pain, but that's all you can do.

I know this is an old thread, but still worth an update for anyone maintaining old code:

I had this problem and it was due to images in RES files being named the same thing. Delphi7 has an Image Editor which can open RES files. Simply open both RES files involved in the Duplicate Resource error, and rename one of the offending duplicate resources. Save the RES files and recompile. Has worked for me twice recently when I replaced an old component in a Delphi 7 app with a (slightly) newer one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top