I am trying to use a Neko DLL (written in C ++) with a C ++ target for Haxe. I can call functions in haxe but cannot pass values.
This is C ++ code -
value Hello(value h)
{
cout << val_int(h);
return val_int(1);
}DEFINE_PRIM(Hello, 1);
This is the Haxe code -
class Main
{
var load = cpp.Lib.loadLazy( "ndll" , "Hello", 1 );
static function main()
{
load(1);
}
}
It is executed only if the function does not accept parameters. In addition, the value returned by the C ++ function for Haxe is equal null.
This code works fine when I compile for the neko target, but it does not work with the cpp target.
Any help is appreciated.
source
share