I’ve been doing some work with Haxe/Heaps and I now want to build an app bundle for macOS/OSX.
So far I’ve done the following:
haxe -m Main --hl out/main.c -lib heaps -lib hlsdl -resource res/level.json@level
That gets me a bunch of C code.
I can then load that C code into Xcode. Fetch in the .hdll and .dylib files from the Hashlink project and build it.
When I run the resulting app bundle I get:
Dyld Error Message:
Library not loaded: fmt.hdll
Referenced from: /Users/USER/Library/Developer/Xcode/DerivedData/TestBundle2-fsryodfodzgjlabfezalbgocsvrz/Build/Products/Debug/TestBundle2.app/Contents/MacOS/TestBundle2
Reason: image not found
My understanding is that this is because you need to do a bunch of stuff with “install_name_tool” to correct various dyld paths in the binaries that Xcode generates. So far I’ve been unsuccessful in figuring out what the magic incantations are to do this.
- Am I going about building a macOS app bundle the correct way?
- If I am going about this the right way how do you correctly include the Hashlink libraries in the app bundle?
Regards,
Patrick.