Files
lime/templates/emscripten/cpp/Main.cpp
underscorediscovery ba35d41715 Updating templates path
2013-11-28 01:23:25 -03:30

42 lines
650 B
C++

/*
* Main.mm
*
* Boot code for lime.
*
*/
#include <stdio.h>
extern "C" const char *hxRunLibrary();
extern "C" void hxcpp_set_top_of_stack();
::foreach ndlls::
::if (registerStatics)::
extern "C" int ::name::_register_prims();
::end::
::end::
extern "C" int main(int argc, char *argv[])
{
//printf("Starting ...\n" );
hxcpp_set_top_of_stack();
::foreach ndlls::
::if (registerStatics)::
::name::_register_prims();
::end::
::end::
//printf("Running\n");
const char *err = NULL;
err = hxRunLibrary();
if (err) {
printf(" Error %s\n", err );
return -1;
}
//printf("Done!\n");
return 0;
}