[Lazarus] How is work search path in CrossPlatform

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Mar 26 16:21:38 CET 2014


On Wed, 26 Mar 2014 16:40:48 +0200
FreeMan <freeman35 at delphiturkiye.com> wrote:

> You right Michael,
> I was wrote "x.pp has just type and const definition"  I understood x.pp 
> and x11 folder about X-server. Maybe my example not clear. Its just type 
> definition no any function or etc
> const
>     X_PROTOCOL = 11;
>     X_PROTOCOL_REVISION = 0;
> type
>     PXID = ^TXID;
>     TXID = culong;

These types and consts have no meaning on Windows.

 
> My subject is "How is work search path in CrossPlatform" I mean my os is 
> linux, so everything is on work clearly, my project too. I can change 
> target os JUST from project options, package options has not target os. 
> If I just open lpk and I can not build lpk to cross platform, this is 
> hard to modification. I have to riddle.

That's the easy part. The package uses the target of the project. Set
the project to win32 and the needed Lazarus packages will automatically
be compiled for win32 too.

 
> "The only solution is not to use this unit. "
> yes, I need test via compile lpk. but how to other platform easly?

For example:
uses
  {$IFDEF Linux}
  x
  {$ELSE}
  Windows
  {$ENDIF}
  ;

Mattias




More information about the Lazarus mailing list