Debian Lenny编译wxWidgets与Code::Blocks SVN版

debian-linux

研究跨平台开发,选择了和Code::Blocks搭挡,那么编译和Code::Blocks最新的版本(不选择Code::Blocks 8.02的原因是现在的版本修复了8.02大量BUG,而且使用最新的版本,同时报告使用中出现的问题,本身也是对Code::Blocks开发的支持)就不可避免了。
在Ubuntu下编译,两都都很顺利,但当基于 Lenny系统来编译时,CB却出现了问题:

codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory

就是这个错误,导致CB根本无法启动。试着把相应文件拷贝到codeblocks主程序所在的/usr/local/bin目录中(还是Windows的思维),仍然出错。经查找资料,发现此时只要把libcodeblocks.so.0所在的目录加入环境变量中就可以了。

sudo /etc/ld.so.conf #编译该文件
/usr/local/lib #将该行加入到该文件的末尾
sudo ldconfig #重新配置

这样就可以正常启动Code::Blocks了。

下面将编译的步骤简单记录一下:

编译
源码目录下新建子目录buildgtk,进入该目录,运行:
../configure –disable-shared –disable-debug –enable-unicode –enable-monolithic –with-opengl –enable-xrc
sudo make install
sudo ldconfig
编译Code::Blocks:
(a) 下载源码
checkout ://.berlios.de/codeblocks/trunk ~/Sources/CodeBlocks
(b) 编译
export ACLOCAL_FLAGS="-I `wx-config –prefix`/share/aclocal"
./bootstrap
./configure
make
sudo make install
(c) 缷载
sudo make uninstall
(d) 重新编译
make clean
make distclean
make clean-bin
make clean-zipfiles
详情:http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux

本文来自:http://www.qpsoft.com/blog/compile-wxwidgets-codeblocks-debian/

Share and Enjoy:
  • Print this article!
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • RSS
  • Slashdot
  • Technorati
  • TwitThis

Related posts:

  1. Code::Blocks IDE in openSUSE 11.1编译和安装指南
  2. 如何在Windows上安装Code Blocks 8.02官方发布版
  3. Code::Blocks IDE: 手动安装和配置编译器指南
  4. C::B IDE的命令行参数
  5. Setting up Code::Blocks to work with SDL - 多媒体编程库
  6. QT4+MinGW+Code::Blocks IDE集成
  7. ProjectManager, Project and ProjectFile in Code::Blocks
  8. Code::Blocks Debug Shortcut and Example
  9. Debugging with Code::Blocks
  10. Linux下配置Code::Blocks帮助插件

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Contact us

Admin: Bryan Wu