fastbasic icon indicating copy to clipboard operation
fastbasic copied to clipboard

Running cross compiler from PATH

Open marianodominguez opened this issue 2 years ago • 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 ?

marianodominguez avatar Mar 19 '23 23:03 marianodominguez

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 avatar Mar 20 '23 14:03 dmsc

What about an optional FB_home env variable?. If it is there. Use it ?

On Mon, Mar 20, 2023 at 7:50 AM dmsc @.***> wrote:

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)" "$@"

— Reply to this email directly, view it on GitHub https://github.com/dmsc/fastbasic/issues/67#issuecomment-1476373094, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOXJI57IF7PEZSXGVCVY5DW5BVB3ANCNFSM6AAAAAAWAMVBUY . You are receiving this because you authored the thread.Message ID: @.***>

--


Mariano Domínguez Molina


marianodominguez avatar Mar 20 '23 15:03 marianodominguez

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

dmsc avatar Mar 20 '23 23:03 dmsc