Compiling a SDL program under windows?


I have been programming a thing, and i used to compile it for linux, and for
windows (while being in linux) by using mingw32.

I have been getting weird stuff, like the windows compiled version wouldn’t
read a character 13 with fgetc, and i have to read it using fread…

Now i get a segmentation fault on the windows version when trying to
allocate memory (just 32 bytes)…

Could anyone tell me how can i compile it under windows? I’ve tried dev-c++
gcc but i can’t manage to run it… it opens a console window and then

Thanks you.–
Lz (@Lz1).