[lazarus] Lazarus and FreeBSD problem finding units
nc-gaertnma at netcologne.de
Fri Aug 1 04:44:39 EDT 2003
On Fri, 1 Aug 2003 08:50:11 +0200 (CEST)
marcov at stack.nl (Marco van de Voort) wrote:
> > Thanks. I did all this and now it finds the units such as buttons and c
> > lasses, but now it can not find the SysUtils unit. I know that sysutils
> > is in /usr/local/lib/fpc-1.0.10/freebsd/units/rtl
The IDE automatically finds this out, by asking the the compiler for its
unitpaths. So, you don't need to specify this path.
> and the .pp file is in
> > /usr/local/share/src/fpc-1.0.10/rtl/unix
This directory can not be determined automatically. So, you should set
Environment -> Environment Options -> Files -> FPC Source Directory to
> and there is a sysuntils.inc in
> > /usr/local/share/src/fpc-1.0.10/rtl/objpas.
The IDE has a built in database for include paths in the FPC source
directory. So, you don't need this.
> > I tried placing the paths to /usr/local/lib/fpc-1.0.10/freebsd/units/rtl
> > and /usr/local/share/src/fpc-1.0.10/rtl/unix in the compile options
> > other units and other sources respectively, but still I get the error.
This is because the units of the FCL (classes.pp) also uses the SysUtils.
The compiler options are only valid for the project directory. The FPC
sources consists of many packages and libraries with dependencies, that
can't be described with a few search paths.
Just set the FPC Source directory in the environment options and the IDE
will scan the directory and auto create the needed settings. You can see the
result in Environment -> CodeTools Defines Editor.
The IDE uses a platform independent mechanism to setup the FPC source
directory. But there are some exceptions which need some tricks (e.g.
syswin32 and syslinux). I only tested it under linux and a little bit under
win32. So, maybe some units or include files will not be found under BSD.
Please report them.
> > The complete error is
> > /usr/local/share/src/fpc-1.0.10/fcl/freebsd/classes.pp(27,3) Error: unit
> > not found sysutils.
> What if you don't supply the FPC rtl source paths, just .o and .ppu?
More information about the Lazarus