Your problem is probably the order of the search paths. FPC first searches in the specified output directory, then the directory of the compiled source file (in your case the *.lpr file) and only then the other supplied directories.
So you need to restructure your source code better.
... "uses the_module in dir/file"
https://stackoverflow.com/questions/1990202/uses-with-unit-file-path-in-unit-file
... anyway I have a more serious look later, should be possible.
[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)
However, maintaining several project will be easier if the ide doesn't search the paths if the unit directory specified explicitly.The IDE has nothing to do with it. It's the compiler and it is by design: you only provide directories to the compiler, not filenames. The compiler itself searches the files and there the rule is first come first serve (and the unit output directory as well as the directroy of the main program file are always first).
You can not use the in on a unit level. anyway I have a more serious look later, should be possible. (even by deleting the *.lpi and let it regenerate by opening the *.lpr, note I and R: I meansContrary to your believe in can indeed be used on the unit level as well. However if relative paths are used the compiler currently uses its current working directory to resolve these. I'll have to check whether this is by intention, cause for units it would definitely be better if the directory of the currently compiled unit is used as basepath...shita not fully architected meta-information storage, whereas (lp) R is a program.)
The IDE has nothing to do with it. It's the compiler and it is by design: you only provide directories to the compiler, not filenames. The compiler itself searches the files and there the rule is first come first serve (and the unit output directory as well as the directroy of the main program file are always first).