User forums > Using Code::Blocks

Code::Blocks successfully compiled on Suse 9.3

<< < (3/3)

Game_Ender:
Did you test for stability yet?  People (include me) have had trouble with opening projects, and running the code completion plugin.  If I can at least get a semi stable code::blocks together I can start work on some pluggins I wanted to do.

killroy:
I didn't have time to test it thoroughly. I played with it for a couple of hours and my first impression was that it is stable enough. I used it to import a project from Visual Studio and made another project from scratch.
Occasionally, I noticed that one of the icons on the toolbar (it was Cut or Paste, can't remember) was flickering, but it's not a big deal.
One time, when I used CloseProject from the menu, the program exited.

I didn't have time yet to write step by step guide for compiling on Suse, but it should be up soon. Basically, it will be just a summary of all the aforementioned things in this thread.

killroy:
Here is my attempt to write a small tutorial on:

Compiling Code::Blocks on Suse 9.3. with WxGTK 2.5.3

Since this is a tutorial for Suse 9.3 distribution, it is assumed that there is no need to compile WxGTK libraries by hand. It is easier to install default WxGTK packages which come with the distribution. For Code::Blocks compilation, wxGTK-devel-2.5.3.1-5.i586.rpm is needed, along with other dependencies. Make sure you have everything installed.

1.
Get the Code::Blocks source code from the website or CVS. For this tutorial, "Code::Blocks version 1.0-RC1-1" was used.


2.
Extract the package by positioning into a directory where it was downloaded and type:
#tar zxf codeblocks-1.0-rc1-1.tar.gz

Enter the source directory:
#cd codeblocks-1.0-RC1-1/src


3.
Check for WxGTK libraries.
If WxGTK is installed, there should be a simple script "wx-config", so type:
#wx-config --version

Output should be:
#2.5.3

Then:
#wx-config --list

Output should be something like:
#Default config is gtk2-unicode-release-2.5
#Default config will be used for output
#Alternate matches:
#gtk2-ansi-release-2.5

If output is like this, it means that the current default WxGTK configuration is unicode.
To compile Code::Blocks, ansi version is needed.


4.
Change WxGTK configuration from unicode to ansi.
If WxGTK libraries are installed from rpm package, there should be two scripts in "/usr/lib/wx/config/" directory, so type:
#ls /usr/lib/wx/config/

Output should be:
#gtk2-ansi-release-2.5  gtk2-unicode-release-2.5

The script "wx-config" that was used in step 3 is actually a link to one of these two scripts and in our case it linked to "gtk2-unicode-release-2.5". In order to use ansi libraries, this link should be changed to point to "gtk2-ansi-release-2.5" script. Because this link is in "/usr/bin", root privileges are needed to modify it.

#su
type root password, delete old link and then make a new one
#rm /usr/bin/wx-config
#ln /usr/lib/wx/config/gtk2-ansi-release-2.5 /usr/bin/wx-config

check configuration again:
#wx-config --list

now it should say:
#Default config is gtk2-ansi-release-2.5
#Default config will be used for output
#Alternate matches:
#gtk2-unicode-release-2.5

exit root mode
#exit


5.
Changing Makefile.unix
We are still in the Code::Blocks source directory where Makefile.unix should be modified.
Use your favorite text editor to modify two lines which can be found somewhere at the beginning of the file.

Find these two lines:
"LIB_WXXRC=wx_gtk2_xrc-2.4"
"LIB_WXSTC=wx_gtk2_stc-2.4"

And change them to:
"LIB_WXXRC=wx_gtk2_xrc-2.5"
"LIB_WXSTC=wx_gtk2_stc-2.5"


6.
Compiling Code::Blocks

From here it's a standard procedure:
#make -f Makefile.unix
#dos2unix -n update update.unix
#chmod +x update.unix
#./update.unix
#output/run.sh

That's it. The procedure is actually pretty straightforward and perhaps it could be applied to build Code::Blocks with different WxGTK libraries.

I hope it helps.

Navigation

[0] Message Index

[*] Previous page

Go to full version