Re: [Vala] undefined reference to 'SDL_Init' and/or 'WinMain@16' (under Windows)

2012-03-20 Thread Raum
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 -

Re: [Vala] undefined reference to 'SDL_Init' and/or 'WinMain@16' (under Windows)

2012-03-20 Thread Abderrahim Kitouni
Hello, 2012/3/20 : > Perhaps a basic linkage error but I dont know how to correct :D You should be looking at the SDL FAQ for Windows: http://wiki.libsdl.org/moin.cgi/FAQWindows For example this question seems to be exactly what you want (don't forget -X before each argument): I get "Undefined

Re: [Vala] undefined reference to 'SDL_Init' and/or 'WinMain@16' (under Windows)

2012-03-20 Thread Raum
Ehm, perhaps I can't use Visual Studio dependencies with MinGW. I've downloaded these packages : http://www.libsdl.org/release/SDL-devel-1.2.15-VC.zip Perhaps I should download (gasp, =__= I didnt notice..) http://www.libsdl.org/release/SDL-devel-1.2.15-mingw32.tar.gz I'll try and keep you infor

Re: [Vala] undefined reference to 'SDL_Init' and/or 'WinMain@16' (under Windows)

2012-03-20 Thread Raum
Well, I've tried but I've got the same error. SDL package : SDL-devel-1.2.15-mingw32.tar.gz (copy files from tarball to directories "include", "lib" and "bin"). To correct a "-lcom32dlg" error, I've installed : http://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/w32api-3.17/w32api-3.17-

Re: [Vala] undefined reference to 'SDL_Init' and/or 'WinMain@16' (under Windows)

2012-03-20 Thread Raum
Ehm.. I don't have any idea or any clue I've tried to create C code and compile it : - /* test2.c generated by valac 0.12.0, the Vala compiler * generated from test2.vala, do not modify */ #include #include #include #include #include #i

Re: [Vala] Boxed type generics

2012-03-20 Thread Tal Hadad
Even known it's doesn't sound like that, and it's work in .Net, double? is always a pointer type. It's the same as double*. This explains the first example error. In the second one, you convert some type to double* and then to double(in the deceleration "double tmp"). The compiler seems to ignore

[Vala] Is there any way to deserialize something into object in vala?

2012-03-20 Thread mar...@saepia.net
Hi, I need to create a sort of abstraction layer between the database and my vala app. It would be great if it was possible to interate over my class properties, read they type etc. and dynamically map fields from the DB to the properties. Is there any way to do that? I know that it is possible

Re: [Vala] undefined reference to 'SDL_Init' and/or 'WinMain@16' (under Windows)

2012-03-20 Thread Raum
Really strange... This code below is correct and a window appears ! == using GLib; using SDL; int WinMain(string[] argc) { SDL.Surface *screen; if( SDL.init( InitFlag.VIDEO ) < 0 ) { stdout.printf( "Impossible d'initialiser SDL: %s\n", SDL

Re: [Vala] Is there any way to deserialize something into object in vala?

2012-03-20 Thread Eric Gregory
On Tue, Mar 20, 2012 at 6:03 AM, mar...@saepia.net wrote: > Hi, > > I need to create a sort of abstraction layer between the database and > my vala app. > > It would be great if it was possible to interate over my class > properties, read they type etc. and dynamically map fields from the DB > to

Re: [Vala] Boxed type generics

2012-03-20 Thread Stephan Hilb
> In conclusion, use (double) instead of (double?). I'd happily use (double), as it makes sense. But the generated c-code is wrong and the C-compiler complains: error: pointer value used where a floating point value was expected That is quite understandable when looking at the generated c-code,