Recent

Author Topic: Search path for Synapse units  (Read 3950 times)

RMS

  • Newbie
  • Posts: 1
Search path for Synapse units
« on: July 27, 2014, 06:52:56 am »
I hope that you all will pardon some really basic questions.  I've searched for answers before posting here, but they don't quite make sense.

---------------

I just installed Lazarus 9.30.2-2 and FPC 2.4.4 into a Asus factory installation of Ubuntu Pangolin.  I let Ubuntu Software Center do the installation so that it would be done right.  Using my newly installed Lazarus, I can write and execute helloworld and other simple GUI programs.  So I assume that it is installed correctly.

Next, I want to add Synapse units from Ararat.  It should be easy. I've downloaded and unzipped them.  They are sitting in my download directory.

---------------

One option would be to put them where the compiler will look for them.  However, when I try to figure out exactly where to put them, I can't figure out where the compiler will look.  ( There are lots of subdirectories with file.o and file.ppu in them.  Some appear to be installation detritus, others are only visual components, etc  )

The Lazarus wiki suggests looking at the menu "Project / Project Options / Compiler Options"
and "Tools / Options / Environment / Files / FPC source directory."

Unfortunately, neither of those menu/submenus exists on my copy of Lazarus.

--------------

The second option would be to put the units someplace, and then tell the compiler to look there.

The Ararat.cz howto page says that you can put them anyplace, as long as you tell the compiler where they are.  It  suggests “Environment>CodeTools options”, and continues... 'there should be a textbox at the top that says “Aditional source search path for all projects”'

That menu>submenu does not exist on my copy of Lazarus either.

--------------

I can't figure out what I am missing here. 

I've looked through all kinds of pull down menus, but I can't find anything that allows me to do either option.  ( FWIW, my top level menu looks like this: "File Edit Search Project Run Package Tools Environment Window Help"  The submenus don't seem to match what other people see. )

I have a brand new install - which works - and I don't want to muck it up by experimenting with random placement of units.  I like clean, logical, well organized directories.

---------------

QUESTIONS:

1) I've come to the conclusion that this latest version of Lazarus has a different menu structure.  Is this true?

2) How do I tell the compiler that I have an additional search path for units?  ( This is my preferred option.  It seems to make organization easier. )

3) If I can't tell the compiler to look in a particular place, where should I put the Synapse units so that it will find them?

Thanks

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Search path for Synapse units
« Reply #1 on: July 27, 2014, 07:12:30 am »
1) you have a really old version installed the latest lazarus version is 1.2.4 with fpc 2.6.4. The repository you used fro installation hasn't been update for at least a year.

2) lazarus does not have what is known from the other IDEs as a search path. Every package that is use by an application adds its own path to the application's search path build a very dynamic environment. The only thing you have to do is to load the synapse packages and press compile after than simple adding the synpase package the application's requirements is enough for the ide to append the folder where the synapse units are when compiling.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

eric

  • Sr. Member
  • ****
  • Posts: 267
Re: Search path for Synapse units
« Reply #2 on: July 27, 2014, 08:28:53 am »
You can add the synapse path to the "Other unit files" section of Project Options. The path is ...../synapse/source/lib

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Search path for Synapse units
« Reply #3 on: August 02, 2014, 03:16:40 pm »
Richard, is that you ;) ?
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Search path for Synapse units
« Reply #4 on: September 03, 2014, 05:19:19 pm »
The easiest way to do this is to install the synapse_laz package that is included with synapse, then in your project inspector just add a new requirement for laz_synapse.   No need to mess with a library path at all.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

 

TinyPortal © 2005-2018