Launch failed (SOLVED)

Hi everybody,
I’m enjoying your great tool for few months now and I’m quite happy about it (already released a very small game with it, and I’m about to release a second one - a “remake”, and I’m planning to use it even more in the future for new games - already started to work on them too).
These last days I’ve tried to add some native extension to add GameCenter capabilities in the second game - and everything works fine. On Mac.
But after adding that component, on Windows I cannot run the game from the Editor (I’m using the latest version - and I’ve checked to code, that I didn’t write, and it seems ok - and if not I would have expected a compilation error, not a launch one).
I’ve also rebuild/delete the building folder several times, and I didn’t find any log.
It’s not an issue I can’t handle (I can work on Mac, or I can remove the native extension and add it again only at the end) - but I wonder if you have some tips about that

Thanks in advance for your help
Marco

2 Likes

Hi Marco! I’m happy to hear that you are enjoying Defold!

Could you please provide me with links to the extensions that you’re using?

Do you get any error in the console when building and running?

1 Like

The native extension I’m using is this one: https://github.com/vinhvd/defoldgamecenter
Note: on Mac I can launch the app (I mean I can “run” and even “debug”)
No - I just see one warning on c++ part (different size between int and lua integers - nothing crucial - and i’ts marked as warning, not errror) but everything builds fine

On Win10 at the end I just see that the app doesn’t start and I get a Launch failed on the left button of the Defold IDE

It’s probably still related to the native extension somehow. The extension generates a null implementation for windows so that should be ok. I can take a look tomorrow on a windows 10 machine at work, unless @Mathias_Westerdahl or @Johan_Beck-Noren has time to try it today.

thank you very much. As I told you, I’d be glad to see it solved/explain how to work it around - but I can proceed even with this issue (working on my secondary machine - that’s a Mac) - so it’s not urgent - above all if this happens just to me or if it’s related to this specific extension. Thanks for your time

yes - there is a problem in gamecenter.cpp file - because it include unistd.h
changing it this way it works

#if defined(DM_PLATFORM_IOS) || defined(DM_PLATFORM_OSX)
#include <unistd.h>
#endif

I’ve seen the error message in Defold console after an update (I don’t know if you changed something - or if my version wasn’t the latest one, as I believed) anyway now the app can be launched .-)

Thx

That’s great news! Sorry for not getting back to you today.

1 Like