Page 1 of 1

Firemonkey Duplicate Resource

Posted: Sun Aug 11, 2019 8:45 am
by Philip Rayment
I get a number of "Duplicate Resource" warnings when I add a TFMXChromium component to a form, or more precisely, when uFMXChromium is in the uses list.
[dcc32 Hint] H2161 Warning: Duplicate resource: Type 12 (CURSOR GROUP), ID 32761; File c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release\Controls.res resource kept; file c:\program files (x86)\embarcadero\studio\20.0\lib\Win32\release\FMX.Controls.Win.res resource discarded.
I believe that this indicates that uFMXChromium is somewhere including a VCL unit.

(The CEF4Delphi version dates back to January this year, but I haven't seen any mention in these forums of this being fixed in later versions.)

Re: Firemonkey Duplicate Resource

Posted: Sun Aug 11, 2019 12:05 pm
by salvadordf
If I remember correctly, that issue was fixed by adding a conditional compiler directive to the VCL.Forms dependency in uCEFApplication.pas

Re: Firemonkey Duplicate Resource

Posted: Fri Aug 16, 2019 12:04 pm
by Philip Rayment
I later discovered that the main CEF4Delphi page says
FireMonkey applications using CEF4Delphi need to add a $(FrameworkType) conditional define in the project options to avoid duplicated resources.
And yes, uCEFApplication has "{$IFNDEF FMX}Vcl.Forms,{$ENDIF}" in it (at least in the latest version, which I've now installed).

But I'm still getting Duplicate resource warnings, including when I compile SimpleFMXBrowser, which has that conditional define.

Re: Firemonkey Duplicate Resource

Posted: Sat Aug 17, 2019 8:01 am
by salvadordf
I built the FMX demos again with the latest CEF4Delphi version and I don't get that warning with Delphi 10.3

Perhaps there's an old DCU or BPL file from the previous CEF4Delphi version in your system. Please, uninstall it, close Delphi, delete the related DCU and BPL files and install CEF4Delphi again.