Hello, I've got this message : ------------------------------------------- C:\vala-0.12.0>valac --pkg sdl -X -lsdl -X -mwindows --verbose test2.vala gcc -o 'C:/vala-0.12.0\test2' 'C:/vala-0.12.0/test2.vala.c' -mms-bitfields -Ic:/vala-0.12.0/include/glib-2.0 -Ic:/vala-0.12.0/lib/glib-2.0/include -Lc:/vala-0.12.0/lib -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl '-lsdl' '-mwindows' 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) -----------------------------------------
I've tried '-X -lSDLMain' option : ---------------------------------------------------- C:\vala-0.12.0>valac --pkg sdl -X -lsdl -X -lSDLMain -X -mwindows --verbose test2.vala gcc -o 'C:/vala-0.12.0\test2' 'C:/vala-0.12.0/test2.vala.c' -mms-bitfields -Ic:/vala-0.12.0/include/glib-2.0 -Ic:/vala-0.12.0/lib/glib-2.0/include -Lc:/vala-0.12.0/lib -lgobject-2.0 -lgthread-2.0 -lglib-2.0 -lintl '-lsdl' '-lSDLMain' '-mwindows' Warning: .drectve `/manifestdependency:"type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b'" /DEFAULTLIB:"MSVCRT" /DEFAULTLIB:"OLDNAMES" ' unrecognized c:/vala-0.12.0/lib/SDLMain.lib(./Release/SDL_win32_main.obj):(.text[_main]+0x7): undefined reference to `__security_cookie' c:/vala-0.12.0/lib/SDLMain.lib(./Release/SDL_win32_main.obj):(.text[_main]+0x99): undefined reference to `_alloca_probe_16' c:/vala-0.12.0/lib/SDLMain.lib(./Release/SDL_win32_main.obj):(.text[_main]+0xc6): undefined reference to `SDL_strlcpy' (...) ------------------------------------------------ Perhaps a basic linkage error but I dont know how to correct :D Thanks > Hi > > On Mon, Mar 19, 2012 at 3:06 PM, <[email protected]> wrote: >> 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% _______________________________________________ vala-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/vala-list
