Chinaunix首页 | 论坛 | 博客
  • 博客访问: 245339
  • 博文数量: 41
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 441
  • 用 户 组: 普通用户
  • 注册时间: 2015-04-11 11:05
个人简介

123

文章分类

全部博文(41)

文章存档

2019年(2)

2018年(3)

2017年(2)

2016年(11)

2015年(23)

我的朋友

分类: PERL

2015-04-24 12:02:43

问题一:使用perl Gtk2 编程要安装什么软件?
    网上搜索了一把perl Gtk2,几乎没找到有关的帮助手册或教程,那乍知道要装哪些软件呢?看来得求助于yum 的搜索功能了。我们找找看:
[user@localhost encode]$ yum search perl |grep Gtk2
perl-Gtk2-Unique.x86_64 : Perl bindings for the C library "libunique"
perl-Gtk2.x86_64 : Perl interface to the 2.x series of the Gimp Toolkit library
perl-Gtk2-Ex-CalendarButton.noarch : Gtk2::Ex::CalendarButton Perl module
perl-Gtk2-Ex-Dialogs.noarch : Useful tools for GNOME2/GTK2 Perl GUI design
perl-Gtk2-Ex-FormFactory.noarch : Framework for Gtk2 perl applications
perl-Gtk2-Ex-Utils.noarch : Extra Gtk2 Utilities for working with GNOME2/GTK2 in
perl-Gtk2-ImageView.x86_64 : Perl bindings to the GtkImageView image viewer
perl-Gtk2-Notify.x86_64 : Perl interface to libnotify
perl-Gtk2-Sexy.x86_64 : Perl interface to the sexy widget collection
perl-Gtk2-SourceView.x86_64 : Perl wrappers for the GtkSourceView widget
perl-Gtk2-SourceView2.x86_64 : Perl bindings for the GtkSourceView 2.x widget
perl-Gtk2-Spell.x86_64 : Gtk2::Spell perl module
perl-Gtk2-TrayIcon.x86_64 : Perl interface to the EggTrayIcon library
perl-Data-TreeDumper-Renderer-GTK.noarch : Gtk2::TreeView renderer for
perl-Gtk2-AppIndicator.x86_64 : Perl extension for libappindicator
perl-Gtk2-Ex-Carp.noarch : GTK+ friendly die() and warn() functions
perl-Gtk2-Ex-PodViewer.noarch : A Gtk2 widget for displaying Plain old
perl-Gtk2-Ex-Simple-List.noarch : Simple interface to Gtk2's complex MVC list
perl-Gtk2-GladeXML.x86_64 : Create user interfaces directly from Glade XML files
perl-Gtk2-ImageView-devel.i686 : Development headers for perl-Gtk2-ImageView
perl-Gtk2-ImageView-devel.x86_64 : Development headers for perl-Gtk2-ImageView
perl-Gtk2-Sexy-tests.x86_64 : Test suite for package perl-Gtk2-Sexy
perl-Gtk2-Unique-devel.i686 : Development headers for perl-Gtk2-Unique
perl-Gtk2-Unique-devel.x86_64 : Development headers for perl-Gtk2-Unique
perl-Gtk2-WebKit.x86_64 : Web content engine library for Gtk2

由搜索结果来看,把perl-Gtk2开头的软件包都装上应该可以。那就装来试试。
sudo yum install perl-Gtk2* -y

好,安装完了,那下一步该做什么?自己写一个perl图形化程序么?之前没接触过啊,整不来。系统里会不会有范例?找找看吧。
rpm -ql perl-Gtk2|les
..........................................
/usr/share/doc/perl-Gtk2-1.247/examples
/usr/share/doc/perl-Gtk2-1.247/examples/accel_groups.pl
/usr/share/doc/perl-Gtk2-1.247/examples/adding_stock_icons.pl
/usr/share/doc/perl-Gtk2-1.247/examples/assistant.pl
/usr/share/doc/perl-Gtk2-1.247/examples/attributes.pl
/usr/share/doc/perl-Gtk2-1.247/examples/buttonbox.pl
/usr/share/doc/perl-Gtk2-1.247/examples/cairo-clock.pl
/usr/share/doc/perl-Gtk2-1.247/examples/cairo-rendering.pl
/usr/share/doc/perl-Gtk2-1.247/examples/calendar.pl
/usr/share/doc/perl-Gtk2-1.247/examples/cellrenderer_date.pl
/usr/share/doc/perl-Gtk2-1.247/examples/cellrenderer_popup.pl
.....................................................................
/usr/share/man/man3/Gtk2.3pm.gz
/usr/share/man/man3/Gtk2::AboutDialog.3pm.gz
/usr/share/man/man3/Gtk2::AccelGroup.3pm.gz
/usr/share/man/man3/Gtk2::AccelLabel.3pm.gz
/usr/share/man/man3/Gtk2::AccelMap.3pm.gz
/usr/share/man/man3/Gtk2::Accelerator.3pm.gz
/usr/share/man/man3/Gtk2::Action.3pm.gz
/usr/share/man/man3/Gtk2::ActionGroup.3pm.gz
/usr/share/man/man3/Gtk2::Activatable.3pm.gz
/usr/share/man/man3/Gtk2::Adjustment.3pm.gz
/usr/share/man/man3/Gtk2::Alignment.3pm.gz
/usr/share/man/man3/Gtk2::Arrow.3pm.gz
/usr/share/man/man3/Gtk2::AspectFrame.3pm.gz
/usr/share/man/man3/Gtk2::Assistant.3pm.gz
/usr/share/man/man3/Gtk2::Bin.3pm.gz
/usr/share/man/man3/Gtk2::BindingSet.3pm.gz
/usr/share/man/man3/Gtk2::Box.3pm.gz
/usr/share/man/man3/Gtk2::Buildable.3pm.gz
..................................
由以输出可知,/usr/share/doc/perl-Gtk2-1.247/examples/中有范例,同时可以使用man Gtk2::Buildable 来查各个部件的用法。
好吧,运行一个来瞧瞧。
perl /usr/share/doc/perl-Gtk2-1.247/examples/dialog.pl

很好,运行成功,说明软件安装好了。

阅读(3010) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~