Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-10

Where in Lazarus 1.5 do I set the project search path?

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bo Berglund

Stupid question but when I google I find "solutions" that direct me to Project/Project Options/Compiler/Paths and Inherited of which only Paths exist...
Then I am directed to source editor / popup menu / file settings / unit info / unit paths
But there is no such thing in my Lazarus...
On the Paths page there is no mention of "source editor".

Example webpage with this non-working info:
http://wiki.freepascal.org/Unit_not_found_-_How_to_find_units

So where exactly do I go in Project settings to view/set the project search path?
I want to partition my sources into functional parts each in its own subdirectory so the path to that must be set somewhere.

Bo Berglund Developer in Sweden

Reply by email

Mattias Gaertner
to Bo Berglund
Stupid question but when I google I find "solutions" that direct me to Project/Project Options/Compiler/Paths and Inherited of which only Paths exist...

The "Inherited Path" are nowadays found in "Project / Project Options / Show Options / Inherited Parameters". They list what came from the packages.

Then I am directed to source editor / popup menu / file settings / unit info / unit paths

These are the combined paths of project and all packages for a single directory. These are the end result after combining, resolving macros and removing duplicates.

Show quoted text 10 lines
But there is no such thing in my Lazarus... On the Paths page there is no mention of "source editor". Example webpage with this non-working info: http://wiki.freepascal.org/Unit_not_found_-_How_to_find_units So where exactly do I go in Project settings to view/set the project search path? I want to partition my sources into functional parts each in its own subdirectory so the path to that must be set somewhere.

Since you are coming from Delphi, keep in mind that Lazarus was designed for cross platform and sharing code.
All search paths are relative.
If your project has a sub directory "stuff" containing .pas files, then add "stuff" to "Project / Project Options / Compiler Options / Paths / Other unit files".

If you want to use a bunch of units in several projects, put them into a directory of their own and create a package. Instead of adding the search path to a project add the package. The IDE automatically creates the search paths for you.
When you want to use the units on another machine, simply copy the directory and open the .lpk file once. The IDE now knows where the package is and any project using the package don't need to worry about the search path.

Mattias

Reply by email