IncludeFile with relative paths and directory traversal (for example ../) in Linux?
Posted: Sat Oct 25, 2025 9:15 pm
Hi!
Is it possible somehow in Linux to specify an IncludeFile as a relative path with directory traversal (for example, "IncludeFile /../../mypath/myfile.pbi")
I am considering a new folder structure, where I don't want to put my project and multi-project include-files in the same folder, or put the include-files in a subfolder of PureBasic or a specific project, but rather in a folder structure like the example below:
- PureBasic folder: my/folder/here/PureBasic
- Includes folder: my/folder/here/Includes
- Projects folder: my/folder/here/Projects/MyProject
I have tried various possibilities without luck, such as:
- XIncludeFile #PB_Compiler_Home + "../Includes/MyInclude.pbi"
- XIncludeFile "/../../Includes/MyInclude.pbi"
- XIncludeFile "../../Includes/MyInclude.pbi"
- And setting a different path first with IncludePath
I prefer not to use absolute paths, to avoid breaking things too much if I later move around folders slightly.
Thank you.
Is it possible somehow in Linux to specify an IncludeFile as a relative path with directory traversal (for example, "IncludeFile /../../mypath/myfile.pbi")
I am considering a new folder structure, where I don't want to put my project and multi-project include-files in the same folder, or put the include-files in a subfolder of PureBasic or a specific project, but rather in a folder structure like the example below:
- PureBasic folder: my/folder/here/PureBasic
- Includes folder: my/folder/here/Includes
- Projects folder: my/folder/here/Projects/MyProject
I have tried various possibilities without luck, such as:
- XIncludeFile #PB_Compiler_Home + "../Includes/MyInclude.pbi"
- XIncludeFile "/../../Includes/MyInclude.pbi"
- XIncludeFile "../../Includes/MyInclude.pbi"
- And setting a different path first with IncludePath
I prefer not to use absolute paths, to avoid breaking things too much if I later move around folders slightly.
Thank you.