Bill Meyer 337 Posted December 17, 2019 I have seen the basic message before, but this one leaves me scratching my head: [DCC Error] E2161 Warning: Duplicate resource: Type 14 (ICON GROUP), ID MAINICON; File D:\MyProj\MyProg.RES resource kept; file D:\MyProj\MyProg.RES resource discarded. The file kept and the file discarded are the same file? Share this post Link to post
rvk 33 Posted December 17, 2019 Look in your project source (the .dpr file)... do you have multiple {$R *.res} lines? Share this post Link to post
Bill Meyer 337 Posted December 17, 2019 45 minutes ago, rvk said: Look in your project source (the .dpr file)... do you have multiple {$R *.res} lines? I don't recall this happening before, but I add a module to the project, and a {$R *.res} is added to the tail of a unit in the DPR. And it has happened now a few times. Hopefully, restarting the IDE will clear that mode. Share this post Link to post
rvk 33 Posted December 17, 2019 Yes, that sometimes happens to me too. Often this is due to the IDE not recognizing some lines and not knowing it already has a {$R *.res} line. Sometimes reordering the uses-units and other elements will fix this (if it keeps happening). (I had to move my {$R} lines above the uses- and {$SETPEFLAGS} lines.) Share this post Link to post
David Schwartz 426 Posted December 25, 2019 (edited) I've seen this show up in projects randomly then not stop, and have never figured out what causes it. But after reading this, I do recall something I saw years ago about how the position of the $R line can cause it. I think in our case, it may have been because of some merging of edited source files and it got put in the wrong place. Some people seem to think that its position is innocuous, but apparently it's not. This is a great reminder. Thanks! Edited December 25, 2019 by David Schwartz Share this post Link to post