Compiling SDL version

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!

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.

I do the following to compile SDL version under Windows:

  1. Include to CodeBlocks/MinGW files from SDL-devel-1.2.15-VC.zip. 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.
  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 (5.44 KB)

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