Hello list,
I am try to write my odbc module for
neko vm these days. when testing a simple c function, I have got a
exception.
this is just a test,
/*
** odbc.c output a
module file named sql.ndll
*/
static value test(value src, value uid, value pwd)
{
val_check(src, string);
val_check(uid, string);
val_check(pwd, string);
{
val_check(src, string);
val_check(uid, string);
val_check(pwd, string);
return
alloc_int(1);
}
}
DEFINE_PRIM(test, 3);
// Odbc.hx, for test
class Odbc
{
private static var test = neko.Lib.load("sql","test",3);
{
private static var test = neko.Lib.load("sql","test",3);
public static function connect(host:String, uid:String,
pwd:String)
{
var r = test(host, uid, pwd);
}
{
var r = test(host, uid, pwd);
}
public static function
main()
{
Odbc.connect("jeremy", "sa", "sa");
}
}
{
Odbc.connect("jeremy", "sa", "sa");
}
}
after compiled, use command line
F:\haxe-1.07>neko Odbc.n
Called from <null> line 1
Called from Odbc.hx line 16
Called from Odbc.hx line 10
Uncaught exception - [EMAIL PROTECTED]
Called from <null> line 1
Called from Odbc.hx line 16
Called from Odbc.hx line 10
Uncaught exception - [EMAIL PROTECTED]
what's going wrong ? who can explain it?
I also found that it is very difficult to debug the module. How can I
use step-by-step debugging in neko module developping?
I use visual studio.net 2003.
thanks,
jeremy
2006-09-26
-- Neko : One VM to run them all (http://nekovm.org)
