Page 1 of 1

PUREBASIC_HOME

Posted: Tue Jul 29, 2025 2:42 pm
by rootuid
My compiler is located

Code: Select all

/Applications/PureBasic.app/Contents/Resources/compilers/pbcompiler
and has been added to my path.


When I try and compile from the command line I get this error

Code: Select all

PureBasic 6.21 - C Backend (MacOS X - arm64) Free
Loading external modules...
Error: The 'PUREBASIC_HOME' env variable needs to be set to the install directory before using PureBasic.
Where is my PUREBASIC_HOME ?

I've tried setting the env variable in ~/.zprofile as :
export PUREBASIC_HOME="/Applications/PureBasic.app/"
This is the ' install directory'

and
export PUREBASIC_HOME="/Applications/PureBasic.app/Contents/MacOS/PureBasic"
This is the folder where the PureBasic app binary is.

and finally
export PUREBASIC_HOME="/Applications/PureBasic.app/Contents/Resources/compilers/pbcompiler"
this is where the compiler is , not the install directory.

None work.I can confirm that the env variable is set when I check with

Code: Select all

env


Thanks :)

Re: PUREBASIC_HOME

Posted: Tue Jul 29, 2025 4:17 pm
by Piero
rootuid wrote: Tue Jul 29, 2025 2:42 pmhas been added to my path.
Hi, Sequoia here; it was set in ~/.zprofile by PB this way:

Code: Select all

export PUREBASIC_HOME="/Applications/PureBasic.app/Contents/Resources"
PATH="$PUREBASIC_HOME/compilers:${PATH}"
export PATH
in case, check if there are "duplicates" in the following lines…

Re: PUREBASIC_HOME

Posted: Tue Jul 29, 2025 4:30 pm
by rootuid
excellent that works.

thanks

Re: PUREBASIC_HOME

Posted: Thu Jul 31, 2025 11:27 pm
by kenmo
Maybe I'm over-simplifying the situation... but if the PUREBASIC_HOME env var is undefined, I don't know why the compiler and/or IDE doesn't just determine PUREBASIC_HOME from its own executable path ... :?:

Re: PUREBASIC_HOME

Posted: Fri Aug 01, 2025 9:45 am
by NicTheQuick
There was a similar thread about this here: viewtopic.php?t=86461