[Lazarus] Project LPI Files and Platforms

Graeme Geldenhuys graemeg.lists at gmail.com
Sat May 16 10:13:09 CEST 2009


On Sat, May 16, 2009 at 9:38 AM, Mehmet Erol Sanliturk
<sanliturk at ttmail.com> wrote:
>>
>> Why? What is not compatible?
>
> For example :
>
> In FreeBSD ( 7.1 ) :
>                /usr/local/share/lazarus/
>                /usr/local/lib/fpc/2.2.2/
>
>   Windows XP : \lazarus\
>
>   Linux  ( Kubuntu 9.04 ) :
>                /usr/lib/lazarus/


That's got nothing to do with project LPI files. That is settings
stored in your lazarus user profile directory (nothing to do with
projects). Lazarus already supports a command line parameter so you
can specify a preferred profile directory if the default is not
sufficient.

eg:   lazarus --pcp=/home/graemeg/.lazarus-testprofile
       lazarus --pcp=c:\users\graemeg\lazarus-windows-test-profile



> Path delimiter conversion is not sufficient for the Lazarus related
> directory names . Platform related conversions are needed ( if a single LPI
> file used , or Platform specific Lazarus directory names are stored with

I have used single .lpi files for all our cross-platform projects and
it works perfectly for years. We have developers that code under
Windows and Linux working on the same project the whole time.


> You will get an error like : Graphics is not found .
> depending on unit uses list order although the same program is compiled
> successfully in the machine (2) .
>
> The same project with the same structure is not compilable in another
> platform only due to LPI differences .

We have never had such an issue. Lazarus has support for "macro"
entries in path directories etc.. for example. Lazarus packages
already use $(PkgOutDir)/ which creates output directies like:
i386-linux or i386-win32 so compiled units don't conflict on various
OS's.  If we compile from the command line we define similar output
directories.

Lazarus and FPC have many $(xxx) macros for paths and values. You
might need to take a look at how your fpc.cfg file is setup as well.
Like I said, we have used the same projects under FreeBSD, Linux (32 &
64bit) and Windows all using the same .lpi file checkout out of a
SubVersion or Git repository. We have no problems. It sounds more like
you have a problem with how you setup your development environment.


> Assume a student is using a computer at home and another at the school with
> different platforms carrying his/her projects with a USB stick or with a
> transportable hard disk .

I have many of my projects in a Git cloned repository on a removable
hard drive. I carry that between work and home. Different systems,
different OS's and again no problems.


Regards,
  - Graeme -


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




More information about the Lazarus mailing list