
I'm organising some of my code into reusable include files. I have one directory where I am puting them all. Using these in my source code is not a problem using "XIncludeFile" but when nesting them I hit this annoyance...
Lets say I have two includes. One is called "Math.pbi" and one is called "String.pbi". They sit in the same dir and the math pbi includes the string.pbi just using: XIncludeFile "string.pbi". I don't want the path list there as thats part of the point of having them all in the one directory. If I put some test code in math.pbi and run it then it's fine and finds string.pbi.
BUT. If I have a NewApp.Pb that has: XIncludeFile "F:\Programming\PureBasicCode\Includes\Math.pbi" and run it I get an error:
Because the virtual path is virtual to the first calling code piece and not the code file that actually calls it!
---------------------------
PureBasic
---------------------------
Line 5: File not found (F:\Programming\PureBasicCode\NewApp\string.pbi)
---------------------------
OK
---------------------------

Using IncludePath doesn't help here either.
How do other people organise their includes? Specifically nested ones. "..\Folder" format only works for the top layer, not for nested includes too
