What is the proper way to enable static linking in OpenFL?
We’re trying to set our game to not ship with a separate lime.ndll for our Windows releases but no matter how I configure our project XML, it still adds a separate lime.ndll. I’ve tried:
The reason I’m asking is that we had players successfully run the exe from the folder directly, but if they create a shortcut to the exe and put it on their desktop, they get an error saying lime.ndll can’t be found. I did some research and this seems to have also been an issue with Dicey Dungeons.
Our current setup is Haxe 3.4.7, OpenFL 8.9.6, and Lime 7.6.3.
Away from computer and typing on phone, but try this lime rebuild windows -static -clean
It’s gonna take a while, but will build the missing static lime lib.
To summarize what I had to do in case others need help:
Either point your lime install to use the dev version on Github or clone the lime Github repo and copy the project/lib folder into your lime/project/lib directory. Apparently these folders are not fetched if you do “haxelib install lime” because they point to other external Github libraries.
Run ‘lime rebuild windows -static -clean’ and wait for it to finish. If you run the command and there is no output, that means it didn’t build and you need to grab or change the project files mentioned in step 1 from Github.
You should now be able to do “haxelib run lime [project] windows -release -static” to get a statically linked EXE