Chasing down a duplicate resource error...

Chasing down a duplicate resource error...

We've got a project, of reasonable size, which originally was developed on FireMonkey but recently we've pulled it back over to VCL. When we build the project now we get a handful of duplicate resource errors which, to my eye, seem to imply there is a FMX resource somewhere still being linked in.

[dcc32 Hint] H2161 Warning: Duplicate resource: Type 12 (CURSOR GROUP), ID 32761; File c:\program files (x86)\embarcadero\studio\17.0\lib\Win32\release\FMX.Controls.Win.res resource kept; file c:\program files (x86)\embarcadero\studio\17.0\lib\Win32\release\controls.res resource discarded.

I've searched all of the units' USES clauses, to no avail - is there an easy way to work out what file(s) might be causing this error?

Comments

  1. Looks like you need to correct your library search path. Remove the reference to the firemonkey folders.

    ReplyDelete
  2. Make sure your DPR file doesn't have a duplicate *.RES entry.

    ReplyDelete
  3. I've a VCL app which has a single FMX form that I need to use -- I get the same build messages. I've no duplicate {$R .. } entries in the DPR (even though Berlin seems insistent on randomly adding them).

    I don't like having these warnings, but I haven't yet figured out what the downside is. It's irritating that it keeps the FMX resources and discards the VCL though, given that the FMX form is listed last in the dpr's uses clause.

    ReplyDelete
  4. Sorted it - and annoyed with myself because I thought I'd checked this;

    On one of the DFMs was the old FireDac GUI Wait Cursor thing. In there is a 'provider' option to say whether it's a FMX or Forms. That had been left as FMX - I should have grepped all of the source code/forms for FMX rather than just hunting FMX. in uses etc.

    Anyway, switching that over to Forms and doing a rebuild - the warnings have gone. Thanks to for the suggestions and sanity checks folks.

    I had deleted that component once, suspectingthere might be some relation there (without noticing the Provider setting) and I put a 'new' GUIWaitCursor component down on the form from the toolbox - but for whatever reason, the provider setting iss defaulting to FMX. So although I deleted this once I didn't really check it properly, so my bad.

    ReplyDelete

Post a Comment