简体   繁体   English

delphi使用FM firemonkey框架找不到图形化的dcu

[英]delphi does not find graphicsd dcu using FM firemonkey framework

I also suffered the problem given already her Graphics.dcu issue . 考虑到她的Graphics.dcu问题,我也遇到了问题。 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. 使用VCL框架我没有问题,仅在将Firemonkey框架与我的单元一起使用时才会发生故障。

OS = WIN 7 Prof. Delphi XE2 Update 4 操作系统= WIN 7 Delphi XE2 Update 4教授

A few things: 一些东西:

  1. While similar, the FireMonkey unit names don't slavishly follow the VCL ones. 虽然相似,但FireMonkey单元名称并没有严格遵循VCL。 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+). FireMonkey的核心单元是FMX.Types (所有版本), FMX.Controls (XE4 +,虽然以前存在), FMX.Forms (所有版本)和FMX.Graphics (XE5 +)。
  2. You should always include the unit scope when referencing a FireMonkey unit, so it's FMX.Forms not just Forms . 引用FireMonkey单元时,应始终包括单元范围,因此它是FMX.Forms而不是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!). 您引用的uses子句似乎只是在Delphi的早期版本中添加到新表单单元中的默认uses子句,再加上Math (缺少Variants表示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). 特别是,如果您确实依赖WindowsMessages ,则将遇到与FMX交叉编译代码的问题(FMX控件通常没有HWND ,并且FMX TForm不支持VCL变体的漂亮消息处理语法)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM