CentOS installation Code: blocks

Source: Internet
Author: User
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 gcc, c and c ++ are required, the default installation, CentOS does not install the compiler, enter the following command in the terminal to install yuminstallgccyuminstallgcc-c ++ 2. install the gtk2-devel

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, install with rpm command or double-click

Or run the command: yum install wxGTK.
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 or./Configure -- prefix =/usr/local/codeblocks

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
Using namespace std;

Int main ()
{
Cout <"Hello CodeBlocks! "<
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-> EnvironmentOpen 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.