Author Topic: How include SynaSer?  (Read 335 times)


  • Jr. Member
  • **
  • Posts: 91
How include SynaSer?
« on: September 25, 2019, 06:02:30 pm »
how do I include new libs/Units?
I have download it.
But I don't want copy all files into my source code Folder.
It is needed for every new program to say him a path?
Or in which folder have I copy it for general use?

Found a solution..but how you do this?
Project=>Project Setting...other units
« Last Edit: September 25, 2019, 06:06:52 pm by coradi »
Amstrad Schneider CPC 6128
Wind XP / 7 / 10


  • Hero Member
  • *****
  • Posts: 7635
Re: How include SynaSer?
« Reply #1 on: September 25, 2019, 06:24:18 pm »
After you downloaded the Synapse package and unzipped it to some folder, you open Lazarus, go to menu "Package" and "Open Package File (*.lpk)". Navigate to the folder in which you stored Synapse and open the file "laz_synapse.lpk". Click "Compile" -- and you are done. (Other packages contain visual components. In this case you click "Use" and "Install" afterwards and confirm the prompt to rebuild the IDE. After the IDE has started you find the new component on the palette.)

In order to use a Syanpse unit such as synaser in your project you open "Project" > "Project Inspector" and click "Add" > "New requirement". Find and select the "laz_synapse" entry in the listbox > "OK". This stores the path to the Synapse units in the project - the IDE does know the location of the synapse files from what you did with "laz_synapse.lpk" at the beginning.

Don't add any paths to the search paths by yourself as you may be used to from Delphi. This will cause a lot of trouble sooner or later if you don't know exactly what you are doing. The Lazarus package concept is much more powerful than that of Delphi.

An easy way to install packages is via the Online-Package-Manager which you find the the "Package" menu. Just check the package to be installed, click "Install", and wait a bit for the download, compilation and rebuilding the IDE. Since the packages of the Online-Package-Manager are used by many people there is a good chance that they will work - this is not guaranteed if you download from some other internet site.
« Last Edit: September 25, 2019, 06:28:13 pm by wp »
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...


TinyPortal © 2005-2018