PUREBASIC_HOME

Mac OSX specific forum
rootuid
User
User
Posts: 48
Joined: Sat Nov 23, 2013 11:46 am

PUREBASIC_HOME

Post 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 :)
User avatar
Piero
Addict
Addict
Posts: 865
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: PUREBASIC_HOME

Post 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…
rootuid
User
User
Posts: 48
Joined: Sat Nov 23, 2013 11:46 am

Re: PUREBASIC_HOME

Post by rootuid »

excellent that works.

thanks
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

Re: PUREBASIC_HOME

Post 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 ... :?:
User avatar
NicTheQuick
Addict
Addict
Posts: 1504
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: PUREBASIC_HOME

Post by NicTheQuick »

There was a similar thread about this here: viewtopic.php?t=86461
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Post Reply