Many units, both in free and commercial libraries, as well as from Embarcadero itself, do not contain full unit names in uses
section such as Winapi.ShellAPI
. We tried to compile a program with madexcept
, which has ShellAPI
in uses
, as well as third-party components with PD.ShellAPI
with Windows
in the Unit scope names
settings and the path to the PD.ShellAPi
at the end of the Library path
. However, it's not possible to compile the program because it always finds PD.ShellAPi
and prints a lot of errors like Undeclared identifier: 'shell32', because it can't find it.
It helped to modify the uses
in the madexcept
from ShellAPI
to Windows.ShellAPI
, but fixing uses
in third-party libraries is definitely not a sustainable solution. For some of us it worked even after modifying some settings, I don't know which ones yet. However, for some libraries from Gnostice containing Stream
and the other one containing PD.Stream
, but with Stream
in uses it never found PD.Stream
.
Is it possible to define the unit search order, like to first search within certain directory including Unit scope names
from the settings and only then continue with other paths? Or another way to avoid similar problems.