I've run into a similar issue.. trying to compartmentalise my includes into subfolders, and some of those PB includes include some other stuff in their own folder.. so in this case, it's a bit of a nightmare to get PB to compile from the top pb file without 'include not found' problems, and also still maintain 'portability' of these includes (for other projects).
I am not really sure of a solution, but I was thinking when compiling reaches these includes, if there is a import library reference (e.g. Import "mylib") it would be good if PB could first check the folder where the pb is (i.e. the folder of the pb file that has the reference to the lib), and try to resolve the lib there before going off anywhere else. The same thing could be done perhaps for any includes that particular pb file has also.
Alternatively, perhaps making includepath support more than one path, instead of just one for all files.
mskuma wrote:.. so in this case, it's a bit of a nightmare to get PB to compile from the top pb file without 'include not found' problems, and also still maintain 'portability' of these includes (for other projects).
I think, the solution is extremely simple:
(1) The default IncludePath is the path of the current file.
(2) An IncludePath statement is valid for the current file only.
Maybe a "Use path of main file" statement for sort of "Callback Includes" could be optional, but this should not be the only possible behaviour.
horst wrote:I think, the solution is extremely simple:
(1) The default IncludePath is the path of the current file.
(2) An IncludePath statement is valid for the current file only.
I think that makes sense. In any case, it certainly would be good to see any improvement to avoid these tangly situations.. I hope this is taken up as a valid issue. Thanks.