Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 805
Vaccano Avatar asked Oct 06 '10 18:10

Vaccano


2 Answers

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

{$WARN SYMBOL_PLATFORM OFF}
like image 61
luchaninov Avatar answered Nov 09 '22 13:11

luchaninov


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.

like image 20
Spook Avatar answered Nov 09 '22 13:11

Spook