- このサンプルをダウンロードして解凍したディレクトリで以下を実行
$ ruby extconf.rb
$ make
$ ruby test.rb
- extconf.rb
- 拡張ライブラリのMakefile作成用
- hello.cpp
- Helloクラスのコード
- hello.h
- Helloクラスのヘッダ
- hello_wrp.cpp
- HelloクラスをRubyで利用するためのラッパ
- test.rb
- 拡張ライブラリを使用するサンプルスクリプト
- OSX 10.7.5
- ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin11.2.0]
- その他Centos6でも動作を確認