INTERFACE {$WARN SYMBOL_PLATFORM OFF} USES Winapi.Windows,etc,{$IFDEF MSWINDOWS}Vcl.FileCtrl,{$ENDIF} System.IniFiles; {$WARN SYMBOL_PLATFORM ON}
编译器显示:
[dcc32 Warning] W1005 Unit ‘Vcl.FileCtrl’ is
specific to a platform
即使{$WARN SYMBOL_PLATFORM OFF}在那里.
为什么?
解决方法
SYMBOL_PLATFORM
控制标记为特定于平台的符号的警告.您的警告与标记为特定平台的单元有关.
用UNIT_PLATFORM
控制这些警告.
The whole unit is tagged (using the platform hint directive) as one that contains material that might not be available on all platforms. If you are writing multi-device applications,the unit might cause a problem. For example,a unit that uses objects defined in OleAuto might be tagged using the PLATFORM directive.
The $WARN UNIT_PLATFORM ON/OFF compiler directive turns on or off all warnings about the platform directive in units where the platform directive is specified.
有一个非常简单的方法让你自己解决这个问题.看看我上面链接的两个文档主题.他们的头衔是:
> W1002符号’%s’特定于平台(Delphi)
> W1005单位’%s’特定于平台(Delphi)
您收到的编译器警告将警告命名为W1005.这是您需要知道的,以确定用于控制它的指令.如果您在查找它们时遇到任何问题,只需在此实例中搜索警告名称W1005.或参考documentation that lists them all.