“特定于平台” Windows 7 上的 Delphi 6 中的警告
我们有一些在 Delphi 6 中编译的遗留代码。我们计划在更新的 IDE 中重写它,但这是一种出路。
当我们编译它时,我们会收到几个这样的警告:
FPrecision is specific to a platform.
This is in VCL\DB.pas。 (不是我们的文件。)FPrecision 的定义如下:
FPrecision Integer Platform
我可以明白为什么它是特定于平台的,但我真的不知道该怎么办。
当我们转向 Windows 7 进行开发时,这种情况才开始发生。
我看到这个问题,但解决方案对我不起作用。我无法将预编译器标签添加到 DB.pas,并且项目文件没有任何选项(我可以看到)来抑制此警告。
我唯一的选择是关闭所有警告还是接受它?
We have some legacy code that compiles in Delphi 6. There are plans to rewrite it in a more current IDE, but they are a ways out.
When we compile it we get several warnings like this:
FPrecision is specific to a platform.
This is in VCL\DB.pas. (Not our file.) FPrecision is defined like this:
FPrecision Integer Platform
I can see why it is platform specific, but I don't really see what to do about it.
This only started happening when we moved to Windows 7 to develop on.
I saw this question, but the solution does not work for me. I cannot add the pre-compiler tags to DB.pas and the project file does not have any options (that I can see) to suppress just this warning.
Is my only option to turn off all warnings or live with it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您仅针对特定平台开发,请打开项目源代码(项目>查看源代码)并添加
If you develop only for specific platform open project source (Project > View source) and add
您可以安全地忽略平台警告。 Delphi 6和7是当时开发的,当时Borland正在试验Kylix以提供一种编写跨平台Delphi程序的方法。标记为平台的项目与平台相关,通常(但不限于)涉及文件访问例程和常量。 Kylix 项目失败了,不再受支持,所以即使你愿意,也没有办法将代码编译到 win32 以外的平台上。我不太确定,但据我记得,在更高版本的 IDE 中不再有平台警告(如果我错了,请纠正我)。
最好的问候——斯普克。
You can safely ignore the platform warnings. Delphi 6 and 7 was developed at the time, when Borland was experimenting with Kylix to provide a way to write cross-platform Delphi programs. The items marked as platform were platform-dependent, usually (but not limited to) concerning file access routines and constants. The Kylix project failed and is no longer supported, so even if you wanted to, there is no way to compile the code onto platform other than win32. I'm not entirely sure, but as far as I remember, there are no more platform warnings in later versions of the IDE (please correct me if I'm wrong).
Best regards -- Spook.