[Neko] value check exception when call a c function from haxe

flashvan flashvan at gmail.com
Tue Sep 26 08:17:12 CEST 2006


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);

     return alloc_int(1);
    }
DEFINE_PRIM(test, 3);


// Odbc.hx, for test
class Odbc
{
 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);
 }

 public static function main()
 {
  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 - sql at test

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/neko/attachments/20060926/0f3795af/attachment.htm


More information about the Neko mailing list