Search paths to library files and project files? lazarus / 11-Options ---------------------------------------------------------------------- Elphi · 2005-12-12 16:35 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 · 2005-12-13 10:42 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) ---------------------------------------------------------------------- Anonymous · 2005-12-13 13:10 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 · 2005-12-13 18:28 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 · 2005-12-14 01:33 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 · 2005-12-14 10:31 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 · 2005-12-14 18:04 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 ---------------------------------------------------------------------- Anonymous · 2005-12-15 13:57 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 · 2005-12-15 13:58 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 · 2005-12-16 11:48 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\* ---------------------------------------------------------------------- Anonymous · 2005-12-21 10:07 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 · 2005-12-21 10:58 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 · 2005-12-21 14:04 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 · 2005-12-22 09:42 THe IDE is helping you organize units by using packages. ---------------------------------------------------------------------- Elphi · 2005-12-22 10:36 Ok, in a former post I wrote that I did try using a package of my library files, but it didn't work. ---------------------------------------------------------------------- Marc · 2005-12-23 10:14 I read it. Unfortunately I don't know much about packages (and what to do if it doesn't work) ---------------------------------------------------------------------- felipemdc · 2005-12-24 01:12 I also read, and don't know anything about packages either ^^ If I were you I would simply add manually the minimal necessary directories on "Other units path" for the project to work =P It I will give you less headache, will work. The only problem is the minutes you have to use to enter the paths. But I think that it will be much less minutes then learning how to create a package.