Since XE2 the Delphi units are scoped.
Is is right to say that if I use only System and Data scoped units my code will be multiplatform and compiled for both Mac and Windows targets?
and the rest of the Vcl, Winapi, and Posix references must be governed by conditional compilation platform symbols?
Data
- in general, no. For example, Data.DBXMsSQL
(SQL Server dbExpress driver) is supported on Windows only. Also System
and Data
"root" scopes may have Win
subscope, supported on Windows only. For example, Data.Win.ADODB
(dbGo) or System.Win.Registry
(Windows registry). Beside that System
and Data
are crossplatform. Additionally to Data
the DataSnap
scope is crossplatform.
Vcl
, Winapi
, and Posix
you can IFDEF. Other option is to create and use platform specific application units and IFDEF them in uses
.