Closed Ilir-Liburn closed 2 years ago
Never mind. If I compile haxe-c-bridge dynamic library using cl, and then link such library against gcc, it is working fine. Maybe is -fPIC, or some other gcc switch needed.
Are you using Main_stopHaxeThreadIfRunning(false);
before exiting? Otherwise, the haxe thread might be still busy. Pass true
if you want to wait for haxe to execute any events it has scheduled
Hello,
no, I'm using haxe-c-bridge differently because I don't want threads in my app, and I don't want callbacks/locks.
Basically, first I initialize main thread (using __hxcpp_lib_main()) and then call external haxe-c-bridge functions. This is working perfectly if app is statically linked, while dynamic linking have some issue which is not important now. I can debug and I can make release if dll is built using cl.
Hello,
I use dynamic linking (-D dll_link) to link haxe-c-bridge dynamic library to my dynamic library.
Linking works, haxe-c-bridge extern C functions are called successfully in my dynamic library, but app is crashing at exit (detected using post-mortem debugger feature).
I tried using exit(0) at the end, hoping system gets another route for cleanup, but that doesn't solve the issue. Any idea?