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

2009-05-21 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > Ah, so that's the secret. :-) Thanks, I'll try this one. I'm pretty > sure I can use some of the built-in path macros in Lazarus IDE to > accomplish this. Afaik lazarus already does this in de lcl/ dir. > > Note that afaik the main reason FPC d

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

2009-05-21 Thread Marco van de Voort
In our previous episode, Tomas Hajny said: > Well, additional advantages of not having IFDEFs in the code (second > scenario) include higher consistency of implementation across the > platforms and no need for changes in the common source when adding support > for new platforms. That is one side.

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

2009-05-21 Thread Graeme Geldenhuys
2009/5/21 Marco van de Voort : > > 2 having make set the includedir to a target version. > > The first is dead simple, the second depends on your makefile system. Ah, so that's the secret. :-) Thanks, I'll try this one. I'm pretty sure I can use some of the built-in path macros in Lazarus IDE to

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

2009-05-21 Thread Tomas Hajny
On Thu, May 21, 2009 10:13, Marco van de Voort wrote: > In our previous episode, Graeme Geldenhuys said: >> How do I use platform specific include files like FPC does, but in my >> own projects? > > FPC has actually several schemes. > > The most common two are: > > 1 {$ifdef'ed} inclusion of includ

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

2009-05-21 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > How do I use platform specific include files like FPC does, but in my > own projects? FPC has actually several schemes. The most common two are: 1 {$ifdef'ed} inclusion of includefiles. 2 having make set the includedir to a target version. The

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

2009-05-21 Thread Graeme Geldenhuys
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 li