Answer the question
In order to leave comments, you need to log in
Delphi: how to create a unit that connects additional units from a subfolder?
Perhaps a very stupid question, but how to implement the following delphi structure:
There is a project file:
//app.pas
...
uses
unitMain.pas
...
//unitMain.pas
...
uses
subUnit in '.\unitMain\subUnit.pas',
subUnit2 in '.\unitMain\subUnit2.pas'
...
//project.dpr
...
uses
subUnit in '.\unitMain\subUnit.pas',
subUnit2 in '.\unitMain\subUnit2.pas'
...
//unitMain.pas
...
uses
subUnit,
subUnit2
...
Answer the question
In order to leave comments, you need to log in
You need to set the path to the folder in the project settings: Project - Options - Delphi Compiler - Search Path
The path can be set both absolute and relative (relative to the project file).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question