Starting with Delphi XE2, Delphi supports compilation for multiple platforms, as well as various layout configurations. Because of this, Delphi needs to create DCU files for each combination. For example, Win32 , Win64 and OS-X DCU files are saved in separate folders by default. Otherwise, if this were not the case, the DCU files would overwrite each other, which you should avoid (if you use different configurations / platforms).
These parameters can be changed in the project parameters in the very first section of the Delphi Compiler by changing the Unit output directory . This is the default .\$(Platform)\$(Config) , which creates a subfolder for the platform, and then another subfolder for the configuration, for example \Win32\Debug\ . Caution for Target at the very top, which is installed by default on your current platform / config. Usually you need to change it to All Configurations . If you completely clear this field of parameters, this will lead to the default behavior from older versions.
Looks like you should create a Package . This will allow you to group all your “library” units together in one place (BPL). This package can then be installed into your IDE, and if you have any components, these components can be installed in your pallet.
Or you can do without a package. All units from all these different projects should be moved to this central place, although there is one folder containing all your "libraries". Thus, it is less maintenance, and you can simply add this folder to your path to the global library.
If you put your files in a central folder and use these files from the project, the DCU files for the project and this "library" will be saved for this project. Delphi does not know that these files are a “library”, it just knows that you are using them, and since it cannot find an already compiled version of these units, it creates it in your project. If you want DCU files to be saved only once and in this central location, you will need a package.
source share