(OK) Install codeblocks_16.01 on Fedora23

来源:互联网 发布:pandora软件 编辑:程序博客网 时间:2024/04/30 19:46

在Fedora23上安装Codelocks 16.01的过程。


1. 安装gcc,需要c和c++两部分
dnf install gcc
dnf install gcc-c++

2.安装gtk2-devel,因为默认已经安装了正式产品需要的支持库,但是没有安装开发所需要的文档.
dnf install gtk2*

3. 安装wxGTK(或者wxwidgets)

下载地址:http://www.wxwidgets.org/downloads/,下载的文件为:wxWidgets-3.0.2.tar.bz2 和 wxWidgets-3.1.0.tar.bz2,

使用 wxWidgets-3.1.0.tar.bz2 有问题,因此,使用 wxWidgets-3.0.2.tar.bz2

解压之后,进入目录后执行命令

./configure --enable-xrc --enable-monolithic --enable-unicode
make -j5
make install
 ------------------------------------------------------
 
 The installation of wxWidgets is finished.  On certain
 platforms (e.g. Linux) you'll now have to run ldconfig
 if you installed a shared library and also modify the
 LD_LIBRARY_PATH (or equivalent) environment variable.
 
 wxWidgets comes with no guarantees and doesn't claim
 to be suitable for any purpose.
 
 Read the wxWindows Licence on licencing conditions.
 
 ------------------------------------------------------

ldconfig



4. 安装codeblocks,下载codeblocks_16.01安装包,下载地址:http://www.codeblocks.org/downloads/25

这里有两种方式进行安装:

第一种方式是直接下载rpm包,可以直接进行安装,但是rpm安装形式,没有默认安装可视设计wxsmith。

第二种方式是下载源代码包,后缀为.tar.gz(.tar.bz2),下载之后,解压缩,进入目录,执行命令

dnf install libtool
dnf install wxGTK wxGTK-devel
dnf install hunspell hunspell-devel
dnf install gamin gamin-devel
dnf install boost boost-devel

./bootstrap

./configure --prefix=/codeblocks --with-contrib-plugins=all
(如果只是./configure那默认情况是不会安装可视设计wssmith,如果不需要图形界面开发的话可以直接使用第一种安装方式)

make -j5
make install

[root@localhost bin]# pwd
/codeblocks/bin
[root@localhost bin]# ./codeblocks
./codeblocks: error while loading shared libraries: libwx_gtk2u-3.0.so.0: cannot open shared object file: No such file or directory
----------------------------------------
vim /etc/ld.so.conf
最后一行添加:/usr/local/lib
保存退出,然后运行 ldconfig 即可。
----------------------------------------


[root@localhost bin]# ln -s /codeblocks/bin/codeblocks /root/桌面/codeblocks

或者
vi /usr/share/applications/codeblocks.desktop

点击(此处)折叠或打开

  1. [Desktop Entry]
  2. Version=1.0
  3. Type=Application
  4. Name=Code::Blocks
  5. GenericName=IDE
  6. Comment=The open source, cross platform, free C, C++ and Fortran IDE
  7. Exec=/opt/codeblocks/bin/codeblocks %F
  8. Terminal=false
  9. MimeType=application/x-codeblocks;application/x-codeblocks-workspace;
  10. Icon=/opt/codeblocks/share/codeblocks/icons/app_64.xpm
  11. Categories=IDE;Development;
  12. StartupNotify=true



然后,"Applications > Programming > Code::Blocks"

至此,OK


Issue 1: Process terminated with status 255 (0 minute(s), 0 second(s))
控制台程序运行时,未打印东西,而是报了如上信息。
dnf install xterm -y


<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
阅读(60) | 评论(0) | 转发(0) |
0

上一篇:Running docker on Android

下一篇:(OK) 运行cBPM—Fedora23

相关热门文章
  • test123
  • 编写安全代码——小心有符号数...
  • 使用openssl api进行加密解密...
  • 一段自己打印自己的c程序...
  • sql relay的c++接口
  • linux dhcp peizhi roc
  • 关于Unix文件的软链接
  • 求教这个命令什么意思,我是新...
  • sed -e "/grep/d" 是什么意思...
  • 谁能够帮我解决LINUX 2.6 10...
给主人留下些什么吧!~~