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.
IncludeFile with relative paths and directory traversal (for example ../) in Linux?
Re: IncludeFile with relative paths and directory traversal (for example ../) in Linux?
- PureBasic
- Includes/MyInclude.pbi
- Projects/MyProject/Main.pbi
Main.pb:
Code: Select all
IncludeFile "../../Includes/MyInclude.pbi"
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Re: IncludeFile with relative paths and directory traversal (for example ../) in Linux?
You are right. I tested this again, and I must have made a mistake in my initial testing, because this works.
Thank you.
Thank you.

