QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: Qbee on December 11, 2019, 06:26:46 pm

Title: Relative Paths
Post by: Qbee on December 11, 2019, 06:26:46 pm
Hello,

after trying a lot of codes from this forum and others I remarked that some will not run because they have problems to load resources (so I couldn't run Qwerkey's "Pi-in-the-sky" https://www.qb64.org/forum/index.php?topic=1969.0).

Actually I tried to start Ashish's OpenGL-3D-collection from github (https://github.com/AshishKingdom/QB64_OpenGL_Demos) and got an error after starting the first program. I changed the responsible relative path to an absolute path according to my installation. That solved the problem.

Now my question is, how QB64 resolves paths in programs ?

Title: Re: Relative Paths
Post by: Pete on December 11, 2019, 06:33:39 pm
QB64 doesn't resolve paths... QB64 programmers do.

Pete

When I die, I will be programmed into SCREEN 0. That way, I can still talk out of my ascii.
Title: Re: Relative Paths
Post by: FellippeHeitor on December 11, 2019, 06:38:50 pm
In the Run menu, check the option that indicates the next compilation will output the executable to the same folder as the source file you’re compiling.

  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: Relative Paths
Post by: SMcNeill on December 11, 2019, 06:39:12 pm
Paths are relative to where the EXE is.

Go into the IDE and click the option to “Save EXE with Source”, and usually most of your path problems will disappear.  ;)
Title: Re: Relative Paths
Post by: Qbee on December 11, 2019, 06:44:35 pm
Thanks for the quick responses.
Title: Re: Relative Paths
Post by: Qwerkey on December 12, 2019, 07:22:46 am
(so I couldn't run Qwerkey's "Pi-in-the-sky" https://www.qb64.org/forum/index.php?topic=1969.0).

In my defence, I even gave instructions on the "Save EXE to Source Folder" requirement.
Title: Re: Relative Paths
Post by: bplus on December 12, 2019, 10:24:14 am
Can someone remind me why this (Save EXE to SourceFolder) isn't the default option?
Title: Re: Relative Paths
Post by: FellippeHeitor on December 12, 2019, 10:54:28 am
Because it has been added to the IDE long after QB64 was released. Default behavior has always been keeping binaries in QB64’s folder.
Title: Re: Relative Paths
Post by: bplus on December 12, 2019, 11:23:52 am
OK thanks Fellippe