Re: [Vala] undefined reference to 'SDL_Init' and/or 'WinMain 16' (under Windows)
- From: Raum no-log org
- To: vala-list gnome org
- Subject: Re: [Vala] undefined reference to 'SDL_Init' and/or 'WinMain 16' (under Windows)
- Date: Mon, 19 Mar 2012 16:06:25 +0100 (CET)
Well, I've corrected my command line with -X option :
-------------------------------
valac --pkg sdl -X -lsdl test2.vala
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)
---------------------------------
So I've linked my code with sdl library but I've got the last error
undefined reference to `WinMain 16' for libmingw32.a
Any advice ? :)
Thanks
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]