Since CodeBlocks can't be installed from YUM, you'll have to resolve the related dependencies yourself.
Here're my steps:
- sudo yum -y gtk2-devel wxBase wxGTK
- Download C::B from the official site (http://www.codeblocks.org/downloads/26).
I downloaded version 12.11. codeblocks-12.11-1.el6.x86_64.tar.bz2 - Extract downloaded file:
tar -jxvf codeblocks-12.11-1.el6.x86_64.tar.bz2 - You should get codeblocks-12.11-1.el6.x86_64.rpm from the archive. Install it:
sudo rpm -i codeblocks-12.11-1.el6.x86_64.rpm - Done!
However, you'll find it annoying when debugging C++ console programs. C::B will call xterm to run you program but you should run gnome-terminal in CentOS. The parameter that should be passed to gnome-terminal is different too.
In C::B, go to Settings->Environment settings->General settings->Terminal to launch console programs, set the value to be
gnome-terminal --disable-factory --hide-menubar -t $TITLE -x
You still can't break at break point if you are using GDB under version 7.5. Upgrade to GDB 7.5 or higher to resolve this issue.
I installed GDB 7.6 manually because Yum only has GDB 7.2 now.
I installed GDB 7.6 manually because Yum only has GDB 7.2 now.
- Download GDB from http://www.gnu.org/software/gdb/download/
- tar xvfz gdb-7.6.tar.gz; cd gdb-7.6; ./configure; make; sudo make install
Done.
沒有留言:
張貼留言