LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 957|回复: 1

转贴一篇,code::blocks for FC4

[复制链接]
发表于 2005-11-3 02:10:57 | 显示全部楼层 |阅读模式
Guide to codeblocks installation under Redhat 9
« on: October 15, 2005, 09:33:02 PM »
       
I missed one step last time. Added now. This guide is also presented in my medical image analysis blog: http://miasite.blogspot.com/

Guide to codeblocks installation under Redhat 9

Finally I installed the codeblocks under Redhat Linux 9 after 3 days' research.
Here are the details of what I did. Hopefully also useful for other Redhat users, especially Linux newbies.
The whole procedure includes 3 major steps:
(1) Install wxWidgets
(2) Install automake
(3) Install codeblocks
The following assumes you have logged in as root.

(1) Install wxWidgets
1. Download wxGTK-2.4.2-1.i386.rpm, wxGTK-2.4.2.tar.gz and wxGTK-devel-2.4.2-1.i386.rpm from the official wxWidgets website. Let's assume these packages are put under the 'wxwidgets' directory.
2. Install the rpm packages:
  rpm -Uvh wxGTK-2.4.2-1.i386.rpm
  rpm -Uvh wxGTK-devel-2.4.2-1.i386.rpm
3. Build the xrc lib that is not included in the above rpms. So we have to extract the source code and compile them. First unpack the source code:
  tar -xvzf wxGTK-2.4.2.tar.gz
  cd wxGTK-2.4.2
4. Now compile the main source code:
  mkdir bld
  cd bld
  ../configure --with-gtk
  make
5. The above doesn't compile the xrc by default, so we have to do it by ourselves:
  cd contrib/src/xrc
  make
6. Now we need to install the xrc lib manually. First we need to know where the wxGTK lib 'libwx_gtk-2.4' has been installed:
  rpm -ql wxGTK
  In my system, the first few lines say:
  /usr/lib/libwx_gtk-2.4.so.0
  /usr/lib/libwx_gtk-2.4.so.0.1.1
  ...
  Ok, let's install the xrc lib 'libwx_gtk_xrc' to the '/usr/lib/' and make a symbolic link (remember we are now under the 'wxWidgets/wxGTK-2.4.2/bld/' directory):
  cp lib/libwx_gtk_xrc-2.4.so.0.1.1 /usr/lib/
  ln -s /usr/lib/libwx_gtk_xrc-2.4.so.0.1.1 /usr/lib/libwx_gtk_xrc-2.4.so
7. Copy the xrc header files to the right position. First check where the wx header files are installed:
  rpm -ql wxGTK-devel
  In my system, it is:
  /usr/include/wx/
  Ok, we copy the xrc header files to the system directory:
  cp -r ../contrib/include/wx/xrc /usr/include/wx/
8. Run:
  ldconfig


(2) Install autoconf and automake
1. The following versions are needed: autoconf 2.58+, automake 1.7+. Find and download the autoconf and automake rpm packages using rpm find web site. Now we have:
  autoconf-2.59-5.noarch.rpm
  automake-1.9.6-1.noarch.rpm
2. Install them:
  rpm -Uvh autoconf-2.59-5.noarch.rpm
  rpm -Uvh automake-1.9.6-1.noarch.rpm


(3) Install codeblocks
You'll be better off downloading and building the CVS version. It's pretty stable and will become RC2 as it is now. Also the build system has changed. Don't use the RC1-1 on the homepage.

1. Log into CVS, when asked for password, just enter.
   cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks login
2. Download source:
   cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks co codeblocks
3. The above will create the directory 'codeblocks'. This will be the top directory for our installation. Now go into it:
   cd codeblocks
4. Then compile:
   ./bootstrap
   ./configure --prefix=/usr
   make
5. Then install it into the /usr directory:
   make install
6. Now you can run the codeblocks by issuing:
  codeblocks
  Or you can use the 'Start Applications menu' to launch it. It is on the Start Application/Programming/code::blocks IDE

呵可,(2) Install autoconf and automake
这一步可能不要做,默认已经安装好了,

其它的按步骤来

最后发现一个问题
cbprofilerexec.cpp 存在一个错误

        if (first_char != '[')
         {
           item.Clear();
                 item.SetId(next);
//                 item.SetTextColour(wxTheColourDatabase->Find(_T("GREY")));
                 outputCallGraphArea->SetItem(item);
         }

找到这一段(176 行)
   注*这一句
//             item.SetTextColour(wxTheColourDatabase->Find(_T("GREY")));

就可以通过了编译了
不知道你们编译的时候会不会有这个问题
发表于 2005-11-3 12:45:23 | 显示全部楼层
在debian上试了下,用wxgtk2.6, 基本上没有大问题,除了他的脚本需要dos2unix一下
用起来马马虎虎,不过调试时太慢了,另外好像缺省不支持cvs,不知道有没有plugin支持
eclipse一切都好,就是调试时常出错
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表