# Compiling a SDL program under windows?

**URL:** <https://discourse.libsdl.org/t/compiling-a-sdl-program-under-windows/12950>\
**Category:** SDL Development\
**Created:** [January 25, 2006, 8:01am UTC](https://discourse.libsdl.org/t/compiling-a-sdl-program-under-windows/12950 "2006-01-25T08:01:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lz1](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/l/7ab992/32.png) [@Lz1](https://discourse.libsdl.org/u/Lz1)\
**Post date:** [January 25, 2006, 8:01am UTC](https://discourse.libsdl.org/t/compiling-a-sdl-program-under-windows/12950/1 "2006-01-25T08:01:01Z")

</div>

Hello,

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  
crashes.

Thanks you.–  
Lz (@Lz1).  
[http://elezeta.bounceme.net](http://elezeta.bounceme.net)
