Centos6 installation CodeBlocks2012-02-12
Codeblock is a fairly good ide. It provides free, open-source, cross-platform, and other column advantages!
The following describes how to install codelocks on centos6. I hope it will be helpful to later users!
1. Install gccC and C ++ are required. If centos does not install the compiler by default, enter the following command on the terminal:
Yum install gcc
Yum install gcc-C ++
2. Install gtk2-develBecause the support library required by the official product is installed by default, but no documentation is required for installation and development.
Yum install gtk2 *
3. Install wxgtk, Http://pkgs.repoforge.org/wxgtk:
WxGTK-devel-2.8.9-1.el5.rf.i386.rpm
WxGTK-2.8.9-1.el5.rf.i386.rpm
Run the RPM command or double-click to install
4. Finally, download codeblocks and use the source code for compilation and installation.. Enter the decompressed directory and enter the command:
./Configure -- prefix =/usr -- With-contrib-plugins = all
Make
Make install
Note that the installation requires the root permission.
All normal conversations can be installed.Application> ProgrammingCodelocks!
I was excited to write a few lines of code to test it:
/*************************************** *******
* Author: xiaobaoqiu
* From: China University of gensciences
* QQ: 375722880
* Email: xiaobaoqiu@163.com
* Copyright 2012 by xiaobaoqiu
**************************************** ******/
# Include <iostream>
Using namespace STD;
Int main ()
{
Cout <"Hello codeblocks! "<Endl;
Return 0;
}
Compile OK but cannot run it. There is no console interface that we are familiar with. Check the build log carefully and I found the following information:
Executing: xterm-T test-E/usr/bin/cb_console_runnerld_library_path = $ LD_LIBRARY_PATH :. /home/*********/Program/test/bin/debug/test (in/home/*********/Program/test /.)
Here isXtermIt's strange. Let's open the menu.Settings-> Environment
Open the Environment Settings page. We have two settings at the bottom of the general settings page (mainly refer to the second one ):
Shell to run commands in:/bin/sh-C
Terminal to launch console programs: xterm-T $ title-e
In Linux, codeblocks calls xterm to simulate the console interface!
Then I ran an xterm and found no !!!!! This should be the reason!
So install xterm:Yum install xterm
After that, everything is okay. Now we are familiar with the console interface!
About xterm can Baidu: http://baike.baidu.com/view/2046708.htm