CentOS7 64位 安装 CodeBlocks

一、安装版本

1、codeblocks_16.01.tar.gz

2、wxWidgets-3.0.2.tar.bz2


二、安装前准备

1、下载上面两个源码包

2、检查当前系统是否已经安装一下环境,没有的话先安装

  • make
  • gettext
  • autoconf>=2.5
  • automake>=1.7
  • libtool>=1.4
  • m4
  • intltool
  • gcc-c++
  • libstdc++-devel

三、开始安装

1、安装gcc,需要C和C++两部分

  • yum install gcc
  • yum install gcc-c++

2、安装gtk2-devel

  • yum install gtk2*

3、安装wxWidgets,下载地址:http://www.wxwidgets.org/downloads/

        解压后进入目录,执行一下命令进行编译安装

  • ./configure --prefix=/usr --enable-xrc --enable-monolithic --enable-unicode
  • make
  • make install
  • ldconfig

4、安装codeblocks,下载地址:http://www.codeblocks.org/downloads/

        解压后进入目录,执行以下命令进行编译安装

扫描二维码关注公众号,回复: 1681443 查看本文章
  • ./configure --prefix=/usr --with-contrib-plugins=all
  • make
  • make install

5、安装好codeblocks后,在application下会出现programming菜单项,在这里可以启动codeblocks.有时候也会出现无法启动的情况,需要这样做:

  • vim /etc/ld.so.conf
  • 最后一行添加:/usr/local/lib
  • 保存退出,然后运行/sbin/ldconfig

6、安装xterm:yum install xterm

7、如果没有看到codeblocks菜单项,可以创建桌面启动器如下:

  • 点击应用程序--系统工具
  • 选择“启动应用程序”
  • 在启动用程序首选项中选择“添加”
  • 会出现和以前一样的添加启动程序对话框,进行设置
  • 设置完名称和命令(路径)后,点击“添加”,启动器就被添加到列表里了
  • 用鼠标选中刚添加的启动其,将其拖到桌面
  • 右击新建的起动器,选择属性,在权限选项卡中勾选——执行:允许以程序执行文件

  • 同上步,在基本选项卡中点击图标,可以设置启动器的桌面图标。

1、No package 'hunspell' found

解决方法:yum install hunspell

  yum install hunspell-devel

2、No package 'gamin' found

解决方法:yum install gamin

  yum install gamin-devel

3、error: needed boost headers not found or not usable

解决方法:yum install boost

  yum install boost-devel



centos编译出现:类似情况:

     $tar -xvf libpcap-1.0.0.tar.gz  
    $cd libpcap-1.0.0.tar.gz  
    $./configure  
    $make  
    $sudo make install  
5.'aclocal-1.14' is missing on your system. 
You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>

 

解决Ubuntun 12.04编译Mesa10.3 WARNING: 'aclocal-1.14' is missing on your system

  1. 执行如下命令:

yum install install autoconf automake libtool

sudo autoreconf -ivf         就是这一句解决了问题

注意:这条语句是在源文件目录(Mesa-10.3.5)下执行,否则会找不到文件:

猜你喜欢

转载自blog.csdn.net/weicaijiang/article/details/78921069