Ubuntu12.04にwxPerlの環境をインストールしてみた

Ubuntu12.04にwxPerlの環境をインストールしてみたときの備忘録です。

htmlinsert(): The given local file does not exist or is not readable.

関連記事

wxPerlのインストール

以下のコマンドでwxPerl関連のパッケージを検索しインストールしました。

wxPerlでHello world

以下URLのサンプルコードを使用しwxPerlでHello worldを実行しました。
http://examples.wxperl.it/2013/03/hello-world.html

#!/usr/bin/perl
use strict;
use warnings;
use Wx;

package MyApp;
use base 'Wx::App';

sub OnInit {
    my( $self ) = @_;
    # create a new frame (a frame is a top level window)
    my $frame = Wx::Frame->new(
        undef,           # parent window
        -1,              # ID -1 means any
        'Hello World',   # title
        [-1, -1],        # default position
        [250, 150],      # size
    );
    $frame->Show( 1 );


    return 1;
}

package main;

my $app = MyApp->new;

$app->MainLoop;

実行結果

$ chmod +x wxHello.pl
$ ./wxHello.pl
01.gif

以上、Ubuntu12.04でwxPerlをインストールした時の備忘録です。


添付ファイル: file01.gif 652件 [詳細] filewxHello.pl 593件 [詳細]

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2025-03-12 (水) 11:49:44