[quote ]
However, it still compiles the wrong unit file in the app directory
- and wants to archive it by putting all his "the_modul" into sub-directories (that means NONE is in path by default)
Again, no matter what you do: Within the collection of all and any path that you compile any unit from => Each unit can only exists once.
So the other "the_modul" must be in a sub directory too. And at any time, only one of the 2 subdirectories is allowed to be included.
As Thaddy says, using directories that way, to cope with alternate units of the same name: Always a problem.
All my approach attempts to do, is to keep the problem as small as possible.
What you really have is 2 projects. (in one projectgroup)
The shared code should be in a package.
But that is a lot more work to set up.
Or if the_modul is code only (and no lfm). Or differs in code only... Then you only need one file (and only one project, and no package). And a big IFDEF inside it.