0 votes
by newforth (120 points)
edited by newforth

Hello, 

I am trying to compile a small test program using VFXForth on macOS (arm64).

I open VFXForth using any of these (vfx64, vfxforth64, vfxosx64) 

and then I type this:

include hello.fth

SAVE hello.fth 

I get "Can't open stubosx64". I tried making stubosx64.mo and stubosx64 available through $PATH on macOS. But I always get the same result.

Any ideas?

Also, when I run "vfx64 hello.fth" my Terminal window is going crazy with the cursor running fast over the Terminal screen but nothing happens, it doesn't execute the program.

EDIT: Nevermind, I just figured out that VFXForth is not compatible with my architecture.

1 Answer

0 votes
by Theo (200 points)

Hi,

I'm on an M1 Mac and was able to make an executable. ( I have rosetta 2 installed as VFXForth is intel codebase ). I placed the stubosx64.mo in the same location as vfx64, which for me is /usr/local/bin 

I followed the instructions in the manual ( Chapter 26 Building Standalone Programs ). It created an executable and ran without issue.

: start \ hmodule 0 commandline show -- res
4drop
WalkColdChain \ run startup chain
." Hello World! from VFX" cr
0
;
 
' start is EntryPoint
Save hello

Hope this helps. 

ago by Bruno Degazio (330 points)
I agree with Theo's answer. VFX Forth is definitely compatible with your computer's architecture.

I'm on MacOS (15.5, Apple Silicon M4) and vfx runs beautifully in x86 emulation. I regularly make standalone executables/ Theo is correct that you have to make sure to provide a startup word in EntryPoint before compiling the executable. The complete details are in the manual in chapter 26, especially the section titled "Saving to an Mach-o file"
...