Hi,
I'm testing Vala and I think I didn't understand how to use package with
it... I want to use SDL and SDLNet but I've got an "undefined
reference"...
Here is my test program :
--------------------
using GLib;
using SDL;
int main (string[] args) {
SDL.init( 0 );
SDL.quit( );
stdout.printf ("Hello world!");
return 0;
}
--------------------
My command line to compile :
---------------------
>valac --pkg sdl test.vala
(...)\LOCALS~1\Temp/cconhiY1.o:test.vala.c:(.text+0x15): undefined
reference to `SDL_Init'
(...)\LOCALS~1\Temp/cconhiY1.o:test.vala.c:(.text+0x1a): undefined
reference to `SDL_Quit'
c:/vala-0.12.0/lib/libmingw32.a(main.o):main.c:(.text+0xbd): undefined
reference to `WinMain@16'
collect2: ld returned 1 exit status
error: cc exited with status 1
Compilation failed: 1 error(s), 0 warning(s)
--------------------
But this sample below just compile without any error with the same command
line :
--------------------------------------
using GLib;
using SDL;
int main (string[] args) {
stdout.printf ("Hello world!");
return 0;
}
--------------------------------------
Result :
-----------------------
>>valac --pkg sdl test2.vala
>>test2
Hello world!
----------------------
Where am i wrong ?
Thanks !
Regards
Raum
_______________________________________________
vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list