“特定于平台” Windows 7 上的 Delphi 6 中的警告

发布于 2024-09-26 17:36:40 字数 544 浏览 7 评论 0原文

我们有一些在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

酒与心事 2024-10-03 17:36:40

如果您仅针对特定平台开发,请打开项目源代码(项目>查看源代码)并添加

{$WARN SYMBOL_PLATFORM OFF}

If you develop only for specific platform open project source (Project > View source) and add

{$WARN SYMBOL_PLATFORM OFF}
淡莣 2024-10-03 17:36:40

您可以安全地忽略平台警告。 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文