[fpc-pascal] Using platform specific include files like FPC does

Graeme Geldenhuys graemeg.lists at gmail.com
Thu May 21 10:06:11 CEST 2009


Hi,

How do I use platform specific include files like FPC does, but in my
own projects?

for example: In tiOPF we have a tiUtils.pas unit. We try and limit
IFDEFs to only that unit. Often we have a single tiXXX() method which
contains a {IFDEF FPC}  or {IFDEF UNIX} and {IFDEF WINDOWS}.  I would
like to try and remove such ifdefs and use include files to support
Windows, Linux and MacOSX.

Any thoughts on how I can accomplish this like FPC does?

Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/



More information about the fpc-pascal mailing list