Embedded haxe (cpp)

64 views
Skip to first unread message

Rui Campos

unread,
May 19, 2014, 9:20:21 AM5/19/14
to haxe...@googlegroups.com
Hello!

I'm trying to run cpp code generated by haxe, embedded into another application. I'm running the haxe code in a separate thread, I'm doing static linking, and it is a mac application.

I have pretty much the whole setup done, but when it tries to allocate any haxe thing, it crashes.
I tried calling hxcpp_set_top_of_stack() in the beginning of the thread, but that doesn't seem to be enough... 

Am I missing any initialisation code? Any tips on what to look for?

I can't insert anything into the application main, because I don't have access to it. I also tried looking into how nme does the initialization on the different platforms, that's where I got the hxcpp_set_top_of_stack, but I'm probably missing something...


Thanks!
Rui.

Rui Campos

unread,
May 19, 2014, 9:55:50 AM5/19/14
to haxe...@googlegroups.com
Ok! Nevermind! I just had to call hxRunLibrary : ) I thought that would start the app runloop, but I found a way around it. I guess I was missing the "Boot", that registers the haxe classes...

Thanks!
Rui.
Reply all
Reply to author
Forward
0 new messages