Delphi: Add Path to Library or Unit for all Projects
Question by Guest | Last update on 2024-01-01 | Created on 2017-10-25
I have some Delphi libraries and units (partly self-written, partly also third-party components) that I want to use in more than one of my Delphi projects.
It is quite awkward and cumbersome to add all paths, units and directories again and again for each project. Is there any possibility to do that for all projects at once? In other words, I want to define and make Delphi to first search a list of folders for missing units before it complains that a unit is not existing.
Related Topics
Delphi: Define global variables
Tip | 0 Comments
Delphi/Lazarus: Add Item or Line to ListView
Info | 0 Comments
Delphi/Lazarus: How to set up a Link to a Website in an Application
Tutorial | 0 Comments
Original Delphi is too expensive - Are there Alternatives?
Question | 3 Answers
XAMPP: How to set up SSL/HTTPS for local Projects
Tutorial | 4 Comments
HTML5 Canvas: Beginner Tutorial Chapter 3 - Rectangles and Circles
Tutorial | 0 Comments
Delphi: Multiline Caption for TLabel (at Run Time and Design Time)
Tutorial | 1 Comment
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
Yes, you can do that with Delphi. There are so-called search paths that can be defined. Delphi is searching those directories for units.
You can adjust those paths like you want and you can add own folders. Here is how to do that:
y default, in my Delphi version, the folder $(BDS)\Imports is defined here. With $(BDS) you are referencing the installation directory of Delphi, in this case the folder "Imports" under it, which my Delphi version is using for imports standardly.
An example for multiple Search Paths would be:
With this settings, the default folder "Imports" under the installation directory will be searched, but also the folders "MyLib" in this directory as well as the additional folder "C:\Folder\MyUnits", in which you probably have stored some own units.
Last update on 2024-01-01 | Created on 2017-10-25