//I do this because it seeems you did it too at
DECLARE_PRIM(get123,0)
You only need this if you're writing a NDLL (this will export the function).
//here I set loader..
neko_set_loader();
Are you sure that's the returned value of neko_set_loader that you're
using to load the module ?
argc and argc are the commandline arguments.
Maybe simply add the following line :
alloc_field(loader,val_id("loadprim"),alloc_function(loadprim,2,"loadprim"));
To the example available at http://nekovm.org/doc/vm#embedding_the_vm
If I have this enable loadprim here then the app loads the module but
when I call getx function from C it exits (and throws some unhandeled
exception in MSVCRT.dll ..)
That's a crash. It's definitely on the C side.
Best,
Nicolas
--
Neko : One VM to run them all
(http://nekovm.org)