Thread: Need Help Installing New Library To Code::Blocks

  1. #1
    Registered User
    Join Date
    Nov 2011

    Need Help Installing New Library To Code::Blocks

    Hey guys, I need help installing a library called "SDL_draw".

    It can be found at: SDL_draw

    I'm really confused on how to install this. I have already installed "SDL.h", and "SDL_image.h", two seperate libraries, before and worked perfectly but for this library I cannot find a lib folder, nor a sdl_draw.dll file.

    Yes this is the current version, and there was a text file which read:

    Code::Blocks 8.02 Instructions
    - First Build ""
    - Then you can build "" (exe with SDL_draw static library and SDL.dll)
    - At any time you can build "" to get "SDL_draw.dll"
    - The static and dynamic libraries, and the executable 'sdldrawtest.exe'
    are in current directory (you need SDL.dll in this directory to run sdldrawtest.exe).
    I know how to build these by using right click, but what do I do from there? And I tried building " to get the "SDL_draw.dll" but the only file that appears is the layout file of it?

    I have tried googling but there is literally no tutorials over it. There was one I found but I don't really understand it. Can any one help me?

    P.S. the tutorial I found was found here: Building Libraries (for SDL) -


    Thanks in advance!!

  2. #2
    Registered User
    Join Date
    May 2009
    NOTE: These directions are for using an MinGW GCC compiler under 32 bit windows.

    NOTE: These directions are done with the idea of you knowing how to use Code::Blocks basics and that you put the SDL.dll in a folder in the system path manually.

    I download SDL-devel-1.2.15-mingw32.tar.gz from Simple DirectMedia Layer
    I extracted SDL-devel-1.2.15-mingw32.tar.gz the files into folder C:\3rdPartyLibs\SDL-1.2.15
    This folder has several sub folders you need to confirm the sub folder lib and include exist.

    Next, I created an Code::Blocks Global Variable with these settings

    name: sdl
    base: C:\3rdPartyLibs\SDL-1.2.15
    include: C:\3rdPartyLibs\SDL-1.2.15\include\SDL

    I modified the project files in sdl_draw CodeBlocks folder to make them work.
    SDL_draw_dynamic.cbp changes
    changing library name from "SDL\lib\libSDL.dll.a" to "libSDL.dll.a"
    remove "debug" compiler search directories of "SDL\include" and "..\include"
    add "project" compiler search directories of "$(#sdl.include)" and "..\include"
    add "project" linker search directories of "$(#sdl.lib)"
    sdldrawtest.cbp changes
    change "project" compiler search director from "SDL\include" to "$(#sdl.include)"
    changing library name from "SDL\lib\libSDL.dll.a" to "libSDL.dll.a"
    add "project" linker search directories of "$(#sdl.lib)"

    Tim S.

    NOTE: If you have problem post the warning/error and full build log.
    FAQ-Compiling (errors) - CodeBlocks
    Last edited by stahta01; 03-23-2012 at 01:40 PM.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 03-16-2011, 06:31 PM
  2. Help Installing Library
    By geniusisgenius in forum Tech Board
    Replies: 5
    Last Post: 05-18-2010, 05:23 PM
  3. Installing libcurl library
    By samus250 in forum C Programming
    Replies: 4
    Last Post: 04-01-2008, 07:28 PM
  4. Installing GNU C Library
    By prthealien in forum Linux Programming
    Replies: 2
    Last Post: 08-26-2006, 10:19 AM