# Compiling SDL version

**URL:** https://discourse.cataclysmdda.org/t/compiling-sdl-version/1747
**Category:** The Garage
**Created:** [June 12, 2013, 3:50pm UTC](https://discourse.cataclysmdda.org/t/compiling-sdl-version/1747 "2013-06-12T15:50:28Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JimQuaid](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/jimquaid/32/923_2.png) [@JimQuaid](https://discourse.cataclysmdda.org/u/JimQuaid)
#### Post date: [June 12, 2013, 3:50pm UTC](https://discourse.cataclysmdda.org/t/compiling-sdl-version/1747/1 "2013-06-12T15:50:28Z")

</div>

As the title says, how do I actually do it? I’m on Win7 using codeblocks and uncommented make tiles=1 in the makefile but I’m not noticing any difference in performance or interface. Do I need to do something else? Do I need another version or am I doing something completely different?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Narc](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/narc/32/2705_2.png) [@Narc](https://discourse.cataclysmdda.org/u/Narc)
#### Post date: [June 12, 2013, 6:02pm UTC](https://discourse.cataclysmdda.org/t/compiling-sdl-version/1747/2 "2013-06-12T18:02:32Z")

</div>

Code::Blocks doesn’t use the Makefile to compile stuff. Likewise, the comments in the Makefile are there to tell you what to run at a command line – they are not things to uncomment.

Also, I can tell you that what you want is to have Code::Blocks #define TILES for you, and link against the SDL and SDL\_ttf libraries – but I’ll have to pass on how to do that, I don’t use it myself.

---

<div class="post-metadata">

### Author: ![Savidiy](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Savidiy](https://discourse.cataclysmdda.org/u/Savidiy)
#### Post date: [June 14, 2013, 9:03am UTC](https://discourse.cataclysmdda.org/t/compiling-sdl-version/1747/3 "2013-06-14T09:03:27Z")

</div>

I do the following to compile SDL version under Windows:

1. Include to CodeBlocks/MinGW files from [SDL-devel-1.2.15-VC.zip](http://www.libsdl.org/download-1.2.php). Note: we don’t need Win32: SDL-devel-1.2.15-mingw32.tar.gz (Mingw32), it don’t contain librires.
2. Include to CodeBlocks/MinGW files from [SDL\_ttf-devel-2.0.11-VC.zip](http://www.libsdl.org/projects/SDL_ttf/).
3. In CodeBlocks menu Project-\>Build Options-\>Linker Settings-\>Link Libriries-\>Add “mingw32” and path to SDL.lib, SDLmain.lib, SDL\_ttf.lib from CodeBlocks/MinGW/lib/x86
4. In CodeBlocks menu Project-\>Build Options-\>Compiler Settings-\>#defines add string “TILES”

Theoretically it all, but I had to do the following:  
5) Add files to project directory: libfreetype-6.dll, zlib1.dll, SDL\_ttf.dll, from \SDL\_ttf-devel-2.0.11-VC.zip\SDL\_ttf-2.0.11\lib\x86  
6) Add attachments file to CodeBlocks/MinGW/include/iconv.h  
7) When the error occurred “#include \<alloca.h\>” in SDL\_… header file, change this string to “#include \<malloc.h\>”

I had to do so, I cannot guarantee that the path is correct. I hope I have not forgotten anything.

* * *

[iconv.h](https://us1.discourse-cdn.com/flex016/uploads/cataclysmdda/original/1X/689dc777bf5c7c8dbf3b998f08d2a697087445fe.h) (5.44 KB)

---

<div class="post-metadata">

### Author: ![vultures](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vultures/32/69_2.png) [@vultures](https://discourse.cataclysmdda.org/u/vultures)
#### Post date: [June 16, 2013, 5:24pm UTC](https://discourse.cataclysmdda.org/t/compiling-sdl-version/1747/4 "2013-06-16T17:24:22Z")

</div>

For your concern, SDL 2.0 is out and it’s final.  
Hope you make use of it; dl’s linked from wiki.
