Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Firemonkey Duplicate Resource

Post Reply
Philip Rayment
Posts: 9
Joined: Sun May 13, 2018 5:51 am

Firemonkey Duplicate Resource

Post 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.)
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Firemonkey Duplicate Resource

Post by salvadordf »

If I remember correctly, that issue was fixed by adding a conditional compiler directive to the VCL.Forms dependency in uCEFApplication.pas
Philip Rayment
Posts: 9
Joined: Sun May 13, 2018 5:51 am

Re: Firemonkey Duplicate Resource

Post 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.
User avatar
salvadordf
Posts: 4016
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Firemonkey Duplicate Resource

Post 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.
Post Reply