Setting Up Code Blocks On Linux

Another Tutorial by twentytortures.

Before you start:

If you have not yet compiled irrlicht for your system do that now. Instructions can be found here: Compiling On Linux

Let's Go

I just put my computer through some heavy upgrades, including the upgrade to Feisty(well actually I just reinstalled heh), so I'll be doing this as I write it.

The first thing you need to do is download code::blocks. So head to the codeblocks forums and click on the nightly builds thread. Find a new one and download the .deb. In my case I chose the newest: the 19 April build.

There are also rpm's supplied in case you don't run Ubuntu.

My irrlicht folder is in /home/mike so I will be referring to that directory for the remainder of this tutorial, just change it to wherever you put it. :)

After You Install

Make a new console project. Do not use the irrlicht template, I assume it's for windows so it gives us a bunch of errors.

Open up your project settings and under compiler search directories add this: /home/mike/irrlicht/include

Now under linker settings add these libs: If you compiled with Xrandr:

Irrlicht
GL
GLU
Xrandr
Xext
X11

If you compiled it normally (with XF86):

Irrlicht
GL
GLU
Xxf86vm
Xext
X11

If you compiled without XF86 and Xrandr:

Irrlicht
GL
GLU
Xext
X11

If you installed the package in Ubuntu(9.04):

Irrlicht
GL
Xxf86vm
Xext
X11

Under linker search directories add these:

/usr/X11R6/lib$(LIBSELECT)
/home/mike/irrlicht/lib/Linux

Compile Time

Copy and paste the code from one of the examples into your project and compile it. Hopefully it will work.

Other Notes

If this doesn't work, let me know ;).

Contact at twentytortures+irrlicht@gmail.com

References

Someone suggested downloading the build from here is easier.

Another alternative method of getting Code:Blocks is by adding a repository to our Software Sources. To do this, open up System > Software Sources, and in the Third-Party Software tab, click on Add. Put in deb http://lgp203.free.fr/ubuntu/ distname universe where distname is the name of your distro e.g. intrepid, jaunty, etc. Or visit http://lgp203.free.fr/spip/spip.php?article2 for more detailed instructions.

You will also need to have the latest wxWidgets. Follow these instructions at the wxPython website.