Sign in Join

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

Mailing lists / lazarus / 2013-12

package source paths / directories

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Frederic Da Vitoria

Hello,

I am trying to use the MultiLog package. I installed the MultiLog package in Lazarus. I can easily create and use a demo project if the project is in MultiLog's source directory. But if I try to use MultiLog in a project situated in another directory, FPC can't find MultiLog's units when I put them in the uses clause. Of course I could add MultlLog's path to my project's "Other unit files" (I checked, it woks), but I find this not user-friendly (the "user" here is me :-) ), because I'd have to do the same in all the projects where I'd want to use MultiLog. I could also put the MultiLog source in the Lazarus path, but I don't like this idea. I'd rather set the path in the package somehow and let Lazarus transmit this path to FPC, if possible.

I tried setting the MultiLog package's "Unit" zone to $(PkgOutDir);$(PkgDir) but aborted installation after a few error messages. I tried setting the MultiLog package's "Object" zone to $(PkgDir) but this did not help.

Is there a solution or is what I am hoping for currently impossible?

Frederic Da Vitoria (davitof) Membre de l'April - ? promouvoir et d?fendre le logiciel libre ? - http://www.april.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131219/75bb43e8/attachment.html>

Reply by email

Mattias Gaertner
to Frederic Da Vitoria
Show quoted text 23 lines
Frederic Da Vitoria hat am 19. Dezember 2013 um 12:09 geschrieben: Hello, I am trying to use the MultiLog package. I installed the MultiLog package in Lazarus. I can easily create and use a demo project if the project is in MultiLog's source directory. But if I try to use MultiLog in a project situated in another directory, FPC can't find MultiLog's units when I put them in the uses clause. Of course I could add MultlLog's path to my project's "Other unit files" (I checked, it woks), but I find this not user-friendly (the "user" here is me :-) ), because I'd have to do the same in all the projects where I'd want to use MultiLog. I could also put the MultiLog source in the Lazarus path, but I don't like this idea. I'd rather set the path in the package somehow and let Lazarus transmit this path to FPC, if possible. I tried setting the MultiLog package's "Unit" zone to $(PkgOutDir);$(PkgDir) but aborted installation after a few error messages. I tried setting the MultiLog package's "Object" zone to $(PkgDir) but this did not help. Is there a solution or is what I am hoping for currently impossible?

One of the main ideas of Lazarus packages is that you only add the package to your project and the IDE sets the search paths automatically. In fact many error messages and concistency checks assume that you do that. That's why many Lazarus projects and packages seems to have no search paths.

You can add MultiLog to your project either via the Project Inspector, or via IDE menu
Package -> Open Recent Package -> multilog.lpk (this opens the package editor) -> click on Use -> Add to project. Close the package editor.

Mattias

Reply by email

Frederic Da Vitoria
to Mattias Gaertner

2013/12/19 Mattias Gaertner

Show quoted text 48 lines
> Frederic Da Vitoria hat am 19. Dezember 2013 um 12:09 > geschrieben: > > > Hello, > > I am trying to use the MultiLog package. I installed the MultiLog package in > Lazarus. I can easily create and use a demo project if the project is in > MultiLog's source directory. But if I try to use MultiLog in a project > situated in another directory, FPC can't find MultiLog's units when I put them > in the uses clause. Of course I could add MultlLog's path to my project's > "Other unit files" (I checked, it woks), but I find this not user-friendly > (the "user" here is me :-) ), because I'd have to do the same in all the > projects where I'd want to use MultiLog. I could also put the MultiLog source > in the Lazarus path, but I don't like this idea. I'd rather set the path in > the package somehow and let Lazarus transmit this path to FPC, if possible. > > I tried setting the MultiLog package's "Unit" zone to $(PkgOutDir);$(PkgDir) > but aborted installation after a few error messages. > I tried setting the MultiLog package's "Object" zone to $(PkgDir) but this did > not help. > > Is there a solution or is what I am hoping for currently impossible? One of the main ideas of Lazarus packages is that you only add the package to your project and the IDE sets the search paths automatically. In fact many error messages and concistency checks assume that you do that. That's why many Lazarus projects and packages seems to have no search paths. You can add MultiLog to your project either via the Project Inspector, or via IDE menu Package -> Open Recent Package -> multilog.lpk (this opens the package editor) -> click on Use -> Add to project. Close the package editor.

So simple!

Thanks.

Frederic Da Vitoria (davitof) Membre de l'April - ? promouvoir et d?fendre le logiciel libre ? - http://www.april.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20131219/65123052/attachment.html>

Reply by email