[Lazarus] How to tell lazarus the location of a used package?

Mattias Gaertner nc-gaertnma at netcologne.de
Mon Nov 22 00:11:23 CET 2010

On Sun, 21 Nov 2010 23:16:09 +0100
Bo Berglund <bo.berglund at gmail.com> wrote:

> I have switched to using the SVN version of lazarus.
> I put it in parallel to the binary distribution lazarus so now I have
> two of them. After I retrieved lazarus from SVN and also the latest
> release of fpc I got lazarus to compile with help from this list.
> So now I am back to my original project and the strange thing is that
> when I open the project in the new lazarus and compile I get an error
> because lazarus cannot find the sdposerial package.
> It actually opens a dialog box with the text:
> "The project requires the package "SdpoSerialLaz (>=0.1.3)". But it
> was not found. See Project -> Project Inspector."
> The Project Inspector was already on screen, but I don't know what to
> do with it. Never seen it before...
> I *have* copied SdpoSerial from the original lazarus components dir
> into the new lazarus components dir. So what more do I need to do in
> order to get lazarus find the sdposerial package?

Just open the SdpoSerialLaz.lpk once.
The "components" directory has no special meaning to the IDE. The
package can be anywhere on your disk.

> I have intentionally NOT *installed* it in any of the Lazarus versions
> because it does not give me any visual object. But still if I use the
> original lazarus it manages to find sdposerial, but not with the SVN
> version.

The IDE saves the locations of the lpk files in its config directory.

> In Delphi 7 I used to set serach paths for units in my project options
> thus ensuring that I have full control over which version of common
> files were used by my application.
> But I cannot find a corrsponding property in the lazarus project
> options....
> There simply seems to be no place to set project specific paths at
> all. What good is project options if you cannot set the project search
> paths????

The project specific search paths are in the compiler options. But the
directories of SdpoSerialLaz belong to SdpoSerialLaz, not to your
project. Just tell the IDE where the SdpoSerialLaz.lpk is and let
Lazarus handle the search paths automatically.


More information about the Lazarus mailing list