dmsc/fastbasic

Running cross compiler from PATH

marianodominguez opened this issue · 3 comments

it seems compiler can only be ran form install directory:

/home/mariano/8bit-samples/fastbasic
➜ fastbasic git:(master) ✗ fb pi.bas
Can't open target definition file './default.tgt'

is there a FB_HOME or other variable it can be used to point to that directory ?

dmsc commented

Hi!

Yes, this is because getting the executable path in a multi-platform way is not trivial, so the compiler expects to be executed with a path that points to the location...

I solve this with a simple script in my ~/bin/ folder:

#!/bin/bash
exec "/home/daniel/src/fastBasic/fastbasic-git/build/compiler/$(basename $0)" "$@"
dmsc commented

Yes, it is an option, but it is about the same difficulty for the user than using a script ;)