Codeblocks installation in centos is not as easy as in Ubuntu, and can be directly installed in the Software Center. We have to install it on our own, which is not very troublesome.
1. Install GCC and GCC ++ first, which can be directly installed.
# yum install gcc# yum install gcc-c++
2. Install gtk2 again.
# yum install gtk2*
3. Install wxgtk in the same way.
# yum install wxGTK
4. I was going to install xterm. When I used it, I found that some Chinese characters were displayed in a box. I started to think it was codeblocks. I finally found the cause, which is the xterm problem, change the output to the gnome terminal. After installation, go to "Settings"-> "Environment Settings"-> "general settings ", in the "terminal to launch console programs:" on the right, select "gnome-terminal-Disable-factory-T $ title-X" from the drop-down menu, or enter the parameter directly, in this way, the display of Chinese is quite normal.
5. OK, all are ready, now download codeblocks,: http://www.codeblocks.org/downloads/26w.linux, we download codeblocks-12.11-1.el6.i686.tar.bz2 (centos/RedHat 6) This version, after downloading decompress 4 files:
[[email protected] codeblocks]# lscodeblocks-12.11-1.el6.i686.rpmcodeblocks-contrib-12.11-1.el6.i686.rpmcodeblocks-contrib-devel-12.11-1.el6.i686.rpmcodeblocks-devel-12.11-1.el6.i686.rpm
Install now and install all
# rpm -ivh codeblocks*
After the installation is complete, codeblocks appears under the programming of the Application menu and can be used properly.
However, the "spellchecker needs a dictionary to work correctly" error will be reported at startup. To solve this problem, go to "/usr/share/myspell, create a folder named "dicts. Let's take a look at how many items are available now.
OK, there are three groups, respectively "en"GB "," enCA "and" en_us ", we first enter the dicts folder and create soft connections for the first three groups of 6 files
[[email protected] dicts]# ln -s ../en_GB.aff en_GB.aff[[email protected] dicts]# ln -s ../en_GB.dic en_GB.dic[[email protected] dicts]# ln -s ../en_CA.aff en_CA.aff[[email protected] dicts]# ln -s ../en_CA.dic en_CA.dic[[email protected] dicts]# ln -s ../en_US.aff en_US.aff[[email protected] dicts]# ln -s ../en_US.dic en_US.dic
Open codeblocks, choose Settings> Editor, select spellchecker on the left, and enable spelling suggestion tooltips. in the "language" below, you can select what you want. Then, click "OK" to close it. The problem will not be reported the next time you use it.
This article is transferred from: ienter small site