Cross-compile to mac [Issue found]



  • Hi,

    Im trying to compile a project for mac from windows. Aparently everything works OK. I get an ***.app folder, but when I try to run it on mac it says:

    Uncaught exception - load.c(237) : Failed to load library : std.ndll (dlopen(std.ndll, 1): image not found)

    It's strange, because the std.ndll file is inside the MacOS folder. Anybody knows why this could be happening?
    Thanks



  • I don't have a Mac, but FYI, cross-compiling to mac does a neko build, whereas compiling directly on mac gives a cpp build. Though both should run fine...



  • @starry-abyss Didn't know that. Thanks for the info :) Will keep searching for a solution.



  • I've been looking for a solution, and somewhere I read that maybe the .ndlls are worng. So I changed the .ndll libraries in the "MacOS" folder for the ones included in the neko 2.1.0 binaries, and now it gives me another error:

    Could not link to neko.
    Could not link plugin to process (CFFILoader.h 202) - with neko

    I don't have a mac, so a friend is testing it for me. I supose that this means that neko is not installed on the computer, and that it should be installed to work?



  • I am also having this same problem. I am in Windows 10, performed a Mac build and asked my brother to try it out and he got this same error. The std.ndll file is included in the MacOS folder in the .app file.



  • What lime version are you using? I had problems compiling to mac using lime 2.9.1 so I downgraded to 2.9.0



  • What command are you using?
    lime build mac ?
    lime build neko ?

    Mac builds using the command lime build mac, results in a stand alone app that should run in any mac system, regardless if it has neko.
    But I don't know how lime build mac would work on a windows. As far as I know it needs a mac - OSX.



  • @Jefe-Papaya I was using
    lime build mac
    which seems to generate a proper standalone app for me. Here is an example:
    Link to Mac build
    Do you need a mac to do the build? I've not come across anything to indicate this, but I do not know much about Neko. I thought it was similar to building a Mac app under Windows with LibGDX, something I can build but not run.



  • Neko is a VM, and hxcpp is native build. But they produce similar results, both are standalone builds.
    The confusing part is that native cross-builds are not supported and are substituted with neko builds automatically (which are still can only be run in target system).



  • @starry-abyss Nice! It's good to know that cross-builds are actually neko builds.

    I would add that, as far as I know the neko builds require neko installed to be run.



  • @Jefe-Papaya Nope, all dlls are in the build itself. I tested it many times on Linux and Windows



  • Isn't it preferable to have a native build and not use neko for release or is my understanding of this incorrect?


  • administrators

    @Alvalol Yes, Neko is much slower.



  • It is nice to know that it should work. I would prefer to do a native build, but for a jam game, or something that is not being released for sale, I'd still like to have the option to release for mac, even if it is not optimal.



  • @Travis-Stewart
    Here's our jam game cross-compiled from Windows: https://igorsgames.itch.io/mr-bigcash
    Feel free to test it on Mac (not tested yet) ;-)



  • @starry-abyss I sent it to my brother, and will wait to hear back from him. I do wish I had access to more than one Mac user at the moment, in case the problem has something to do with specific Mac setups, rather than a more general problem. I'll have to ask around and see if I can find more testers.



  • @starry-abyss I just remembered my brother went on vacation yesterday, so I suspect catching him online will be a bit spotty for the next few days. Still, hopefully I can catch him at some point and get him to check your app. I'd really like to see if he has a problem with apps other than my own.



  • @Travis-Stewart Thanks, also if there are some additional steps needed to run it aside from just clicking on it, please tell me!



  • This post is deleted!


  • @Agustín-Pérez-Fernández said in Cross-compile to mac:

    What lime version are you using? I had problems compiling to mac using lime 2.9.1 so I downgraded to 2.9.0

    Tried with lime version 2.9.0 and still not working. Same error.
    Thanks anyway.



  • @Sanju Maybe you just need to run some of the Haxe magic commands on the host like:
    openfl setup mac


Log in to reply