Forum > Beginners

How to install a package from source?

(1/3) > >>

Nel_Fie:
01/11/2021 : Current correct answer

How do I install a package from its source files?

As practice I've been trying to install the generics.collection library but I can't figure it out. What I could find on the Lazarus wiki suggests I should be using fppkg, but if I follow the instructions described at step 5, I get the following error:


--- Quote ---The FPC Package tool encountered the following error:
[<currentdir>] Package "rtl" is not installed
--- End quote ---

My best guess is that this is due to PATH not being set up correctly, and fppkg not being able to find rtl as a result. That said, the whole approach might be incorrect, so I welcome any step-by-step walkthrough on how to install such a package from scratch.

NB: I'm entirely new to Free Pascal and Lazarus, and I don't have a formal education in programming. I've been mostly using Python as a hobbyist, and I'm trying FP and Lazarus as a renewed foray into compiled languages. As a result I lack a lot of vocabulary and what might be considered "common sense" or "basic knowledge" to a professional, so feel free to use the simplest English you can muster.

af0815:
You must look for the rigth package :-) fpc have its packagemanagment and Lazarus a different.

If you know nothing about fpc packagemanagment, dont use it. A normal Lazarus user did not use the fpc managment.

So my question is, are you working with fpc only or are you working with Lazarus ?!


in Lazarus you must only

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---... uses fgl;...TSpecList = specialize TFPGList<TCycle>;...  LoadSpecList : TSpecList ;...use fgl

https://wiki.lazarus.freepascal.org/Generics

SymbolicFrank:
There is a difference in syntax in mode Delphi. Some code requires that to work.

JuhaManninen:

--- Quote from: Nel_Fie on October 20, 2021, 02:27:56 pm ---As practice I've been trying to install the generics.collection library but I can't figure it out.

--- End quote ---
Generics.Collections library is now included in FPC distribution. You can use it directly without installing anything extra.
The library is originally from Maciej Izak.

The fgl mentioned by af0815 is an older and more limited generics library. Still very useful for many purposes. It is used also in Lazarus sources in many places.

af0815:

--- Quote from: JuhaManninen on October 20, 2021, 08:38:39 pm ---The fgl mentioned by af0815 is an older and more limited generics library. Still very useful for many purposes. It is used also in Lazarus sources in many places.
--- End quote ---
Then the wiki should be updated to the actual version.

Navigation

[0] Message Index

[#] Next page

Go to full version