Forum > Beginners

How to install a package from source?

<< < (3/3)

/*This post is provided for users dealing with a similar issue, as well as future reference. Reply not required*/

As the answers kindly provided above make clear, there is a distinct difference between Free Pascal and Lazarus. When it comes to packages specifically, a Lazarus package is provided as or containing an *.lpk file.

As for how to install it, here is a page providing instructions: link

Before you can use the package in a project however, you need to mark it as a dependency. This is done in the Project Inspector (Project>Project Inspector). It has a page on the wiki, but it doesn’t contain much information at time of writing.

EDIT: You can find additional information on packages on the Lazarus Packages, including the bit below - but it covers a broad range of topics in a somewhat unordered manner, so I recommend looking through every section even if you're seaching for something specifc.

In the Project Inspector window, click on “Add” (most top left button) and choose “New Requirement”.  This opens a new window with a list of available packages. In the list, find the package you wish to add and click “OK”.
The package should now appear in the Project Inspector, in the “Required Packages” section, and you should now be able to use the package in your project without any errors upon compilation.

Also, here’s a general note on using the Free Pascal/Lazarus wiki: the main page is divided into a “Free Pascal” section on the left, and a “Lazarus” section on the right. Many tutorials and other information from the left section are specific to Free Pascal, and do not apply to Lazarus (and vice-versa).
I know this seems obvious, but I didn’t pay attention to that, and ended up reading documentation that is not relevant to Lazarus. So if you’re using the wiki, don’t make the same mistake I did!

+1 for the feedback


[0] Message Index

[*] Previous page

Go to full version