Recent

Author Topic: Search paths to library files and project files?  (Read 17584 times)

Elphi

  • Full Member
  • ***
  • Posts: 132
Search paths to library files and project files?
« on: December 12, 2005, 05:35:10 pm »
Hi,

It is asked before but never read an answer:

1. Where can I edit paths to files that are referenced in Delphi by:
    Tools|Environment Options|Library|Library Path

2. Where can I edit search paths to files specific for one project, like
    in Delphi set by:
    Project|Options|Directories/Conditionals|Search Path?
 
tia

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2532
RE: Search paths to library files and project files?
« Reply #1 on: December 13, 2005, 11:42:10 am »
There is not really a global lib path. It is a combination of your project and installed packages

For your project, you can configure extra paths in

project - compiler options - paths -> Other unit files (-Fu)
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Anonymous

  • Guest
Search paths to library files and project files?
« Reply #2 on: December 13, 2005, 02:10:55 pm »
Something like References in VBA :?

Pretty annoying knowing I have my own library of hundreds of units. Well, I have to put them in a package I guess.

Elphi

  • Full Member
  • ***
  • Posts: 132
Search paths to library files and project files?
« Reply #3 on: December 13, 2005, 07:28:52 pm »
I've put some library units in a package.
Installed the package and rebuild lazarus
Put this package in the requirements file list of the project.
Added required units to uses clauses.
However, compiling the project results in "Can't find unit xxx" error.

What am I doing wrong?

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Search paths to library files and project files?
« Reply #4 on: December 14, 2005, 02:33:02 am »
ummm I don´t know, but I think you really didn´t need a package.

Just put add the paths to your library units on:

project - compiler options - paths -> Other unit files (-Fu)

Anonymous

  • Guest
Search paths to library files and project files?
« Reply #5 on: December 14, 2005, 11:31:24 am »
We are talking about hundreds of carefully organized directories. I can't understand your reply, sorry.

Remains the problem of installing the library in a package. How can it be made working?

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2532
Search paths to library files and project files?
« Reply #6 on: December 14, 2005, 07:04:02 pm »
Wow, that doesn't look like a small project :)

what you can try is  adin a * to the root of your unit dirs. Something like:
  /path/to/the/root/of/100/units/*

Atleast ing fpc.cfg, fpc then adds all dirs

Don't know much about packages
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Anonymous

  • Guest
Search paths to library files and project files?
« Reply #7 on: December 15, 2005, 02:57:09 pm »
Started with TP1, but if you develop a lot of custom library components that library tree keeps on growing.

Your suggestions, is that some *nix thingy? I don't understand it. I'm on Windows.

Anonymous

  • Guest
Search paths to library files and project files?
« Reply #8 on: December 15, 2005, 02:58:07 pm »
Started with TP1, but if you develop a lot of custom library components that library tree keeps on growing.

Your suggestions, is that some *nix thingy? I don't understand it. I'm on Windows.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2532
Search paths to library files and project files?
« Reply #9 on: December 16, 2005, 12:48:07 pm »
OK,
Suppose you have your units in subdirs of c:\myprojects, like c:\myprojects\project1,  c:\myprojects\project2, etc...
What I understand from you is that you have a lot of those projectX dirs and that you dont want to add them all to your  "other unit files". So what I suggest is to add only c:\myprojects\*
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Anonymous

  • Guest
Search paths to library files and project files?
« Reply #10 on: December 21, 2005, 11:07:05 am »
I can only add an asterisk when I edit the search path directly. However it seems that the only way to add a path is by browsing for it; editting of whatever path directly doesn't work. Is this a bug?

Suppose it works. How are those subdirectories searched? I often keep different versions of components in a subdirectory of the root.

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Search paths to library files and project files?
« Reply #11 on: December 21, 2005, 11:58:17 am »
Here editing the search path directly works well. What version are you using? I tested with 0.9.10 and 0.9.11

It will search for all subdirectories. This will have the same result as in delphi. If you have many versions of the same component, it will choose one. It is better if you move the subdir with the extra versions of the components away, if they have the same name, and unitnames.

Elphi

  • Full Member
  • ***
  • Posts: 132
Search paths to library files and project files?
« Reply #12 on: December 21, 2005, 03:04:24 pm »
I'm using 0.9.10 beta on XPP sp2.
I was not precise in my latest post. I can edit paths directly but the change is not effectuated then; only when I use the browse button and select a path, this edit is recognized when compiling..
By the way: I'm not aware of a Delphi option to include an asterisk to the search paths enabled subdirectory searches.

I fiercely disagree with you regarding your suggestion to spread project/component/class/.. files. It is the task of the IDE to support organizing units on disk, not to disorganize it or promote chaos.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2532
Search paths to library files and project files?
« Reply #13 on: December 22, 2005, 10:42:55 am »
THe IDE is helping you organize units by using packages.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Elphi

  • Full Member
  • ***
  • Posts: 132
Search paths to library files and project files?
« Reply #14 on: December 22, 2005, 11:36:22 am »
Ok, in a former post I wrote that I did try using a package of my library files, but it didn't work.

 

TinyPortal © 2005-2018