CodeBlocks with SDL Support

This is a quick and simple tutorial on how to setup CodeBlocks with support for the Simple DirectMedia Layer (SDL).

Lets start…

If you have never installed CodeBlocks before, keep reading until you see the You are done! text. If you already have CodeBlocks installed skip down to where it says I already have CodeBlocks!.

With this method you should be set for any SDL and OpenGL source code that Diego and I give you. Since you don’t already have CodeBlocks, the first thing you need to do is download these two packages. One is the MinGW compiler with SDL support and the second is CodeBlocks by itself.

Download Files

MinGW with SDL

CodeBlocks Core Application Only

Once your downloads are done, install the MinGW with SDL first. Simply click the extract button and wait until it is done.

Next, Install CodeBlocks ( Just click next until it starts the copying process ) and Run it after the install. When it starts up you will see that it has detected the GNU CCC Compiler, simply click OK and that’s it.

If you want to associate .cpp and .h files with CodeBlocks ( highly recommended ) simply do so. That’s it you have CodeBlocks with SDL support.

******************************************************************************************

******************************************************************************************

It’s nice to know that you are using CodeBlocks, but first lets make sure of something. This guide works if you have installed the CodeBlocks package that comes bundled with the MinGW compiler. If you are using a different compiler, simply download the MinGW with SDL package that is linked above and install it. When you are done installing it simply change the default compiler to the GNU CCC Compiler and you are done!

If you have installed the bundled version of CodeBlocks this will not take that long…

First, Download this package and extract it as it is:

Download File

MinGW SDL Add-in

Next, open CodeBlocks ( don’t open it with a project ) and click on the Settings and then Compilers and Debuggers:

After that, simply click on Reset Defaults and OK on the following 3 Message Windows.

That’s it you now have SDL support on CodeBlocks!

Tags: , , , ,