Franz
Franz

Reputation: 2031

delphi does not find graphicsd dcu using FM firemonkey framework

I also suffered the problem given already her Graphics.dcu issue. My unit statement goes like this

 uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,  Math,

But I have a different issue. Using VCL framework I got no problem, the failure only occurs while using Firemonkey framework with my units.

OS = WIN 7 Prof. Delphi XE2 Update 4

Upvotes: 0

Views: 1335

Answers (1)

Chris Rolliston
Chris Rolliston

Reputation: 4808

A few things:

  1. While similar, the FireMonkey unit names don't slavishly follow the VCL ones. For extra fun, they can also change from version to version! The core FireMonkey units though are FMX.Types (all versions), FMX.Controls (XE4+, though it existed previously), FMX.Forms (all versions) and FMX.Graphics (XE5+).
  2. You should always include the unit scope when referencing a FireMonkey unit, so it's FMX.Forms not just Forms.
  3. The uses clause you have quoted appears to be just the default uses clause added to new form units in very early versions of Delphi, plus Math (the lack of Variants suggests pre-D6!). In practice it is better to only use the units you are actually using symbols from. In particular, if you are really reliant on Windows and Messages, then you will have issues cross compiling the code with FMX (FMX controls typically don't have an HWND, and the FMX TForm doesn't support the VCL variant's nifty message handling syntax).

Upvotes: 4

Related Questions