Friday, November 11, 2005, 1:25:49 AM, Nicolas Cannasse wrote:

>> So I tried running test.n
>> 
>> C:\Dev\neko\neko-1.1-src\bin>nekovm.exe test.n
>> The virtual machine is working !
>> Calling a function inside std library...
>> Called from tools/test.neko line 3
>> Uncaught exception - [EMAIL PROTECTED]

> This exception is raised when a primitive is returning the NULL value.
> In libs/std/others.c   test() is returning alloc_string....

> So there is two possibilities :

> a) alloc_string is returning NULL, which it shouldn't unless there is
> some linking problem (it's function from the C Neko API, so std.ndll
> should dynamicly load it from neko.dll)

I modified test() to:

static value test() {
        val_print(alloc_string("Calling a function inside std library...\n"));
printf("val_null is %p\n", val_null);
        return val_null;
}

and got:

C:\Dev\neko\neko-1.1-src\bin>nekovm.exe test.n
The virtual machine is working !
Calling a function inside std library...
val_null is 00000000
Called from tools/test.neko line 3
Uncaught exception - [EMAIL PROTECTED]

So it appears to be a dynamic linking problem with the datum val_null.

There is special magic required with gcc to dynamically link against
data in DLLs. I will try to experiment with this over the weekend.

e



---
Neko : One VM to run them all

Reply via email to