[SDL] Setting up Code::Blocks IDE for SDL 1.3

jeaye at arrownext.com jeaye at arrownext.com
Wed Jul 27 11:48:46 PDT 2011


I've Code::Blocks 10.05 setup and working with SDL 1.3 on Slackware 13.37.
All I did was locally compile SDL 1.3 and specify the include and library
directories in Code::Blocks (start with an empty project). What works best
for me is to not only specify the directories, but to also specify the
exact library files so that Code::Blocks doesn't go about picking the SDL
1.2 ones. In the Linker options for your project, you're able to select
actual libraries that you'd like to link to, instead of just specifying the
directory and the -l<lib>. As far as SDL_image, SDL_ttf (etc.) go, I've
just been letting Code::Blocks find them (so just using the SDL 1.2
versions), and it's been working very well for me. Just specify -lSDL_image
or -lSDL_ttf (etc.) in the linker settings for your project.


> On Wed, Jul 27, 2011 at 3:30 AM, William Dyce <wilbefast at gmail.com>
>> Hey guys,
>> Just thought I might throw this out before I go too far along with it:
>> the
>> open-source IDE "Code::Blocks" is configured to compile projects using
>> SDL
>> 1.2 if it's installed. This basically just creates a project that will
>> compile and link sources using `sdl-config --libs`. I'm wondering if
>> there's
>> a simple way of using the 1.3 libraries instead of the 1.2 ones. I just
>> compiled and installed SDL-1.3.0-4429, so the libraries are all in
>> /usr/local/lib, but Code::Blocks has a habit of using either the wrong
>> headers (won't compile) or the wrong libraries (crashes at runtime -
>> can't
>> load .so). That's the trouble with IDEs I guess.
>> I'm using 1.3 in order to develop a game for Android and later Linux,
>> Mac,
>> Windows, etc from the ground-up using SDL. Needless it's quicker and
>> easier
>> to test game logic under Ubuntu, so I'm working towards making
>> that will compile for either platform using macros (__ANDROID__ is
>> defined
>> by the port).
>> Who here is working with 1.3? How have you set up your development
>> environment?
>> William
>> _______________________________________________
>> SDL mailing list
>> SDL at lists.libsdl.org
>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

More information about the SDL mailing list