"specific to a platform" warning in Delphi 6 on Windows 7
Asked Answered
S

2

12

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?

Soothe answered 6/10, 2010 at 18:57 Comment(4)
Can't you turn off a specific Warning? IIRC there is a checkbox-list somewhere.Defiant
@Henk Holterman - If you can point me to the list (in Delphi 6 sadly) then that would be the answer.Soothe
Too long ago. But it is very safe to ignore, Delphi 6 was the CLX experiment and this just means "not on Linux". I'm quite sure there is a setting. A second tab on the compiler/build settings maybe. Prob project specific.Defiant
Check the answers to this question #871362Hottempered
R
18

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

{$WARN SYMBOL_PLATFORM OFF}
Rodrigorodrigue answered 11/1, 2011 at 12:2 Comment(1)
also {$WARN UNIT_PLATFORM OFF} can be useful to get rid of the warning for example when using FileCtrl unit.Lector
N
3

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.

Needy answered 7/1, 2011 at 22:24 Comment(3)
You're wrong. They're still there but project files have platform warnings turned off by default. Those warnings will likely play an important role again if/when Embarcadero gets Mac development out the door.Sparry
Well, effectively, if they are disabled by default, that's almost as if there was no warnings at all :) Basing on past Borland/CodeGear/Embarcadero strategy, I would vote on 'if' rather than on 'when'. Well, the bottomline is, that if you do not intend to develop applications outside the win32 world, you can safely ignore all platform warnings. Best regards -- Spook.Needy
Now (Delphi XE7) they are valid again.Command

© 2022 - 2024 — McMap. All rights reserved.