From: Massimiliano Mirra - bard Date: 2003-07-17T17:54:19+09:00 Subject: Re: Togl widget, where to install it? Hidetoshi NAGAI writes: > Probably, ToGL library is not loaded to Tk interpreter. > ToGL bridge for ruby requires to link the ToGL library to > tcltklib (written on the 'README.euc' file). If the library > cannot create as a loadable module, 'link to tcltklib' is the > only way to use it on Ruby/Tk. But if your Tcl/Tk can load the > library by 'package' command, you can use TkPackage module to > load the library to Ruby/Tk. Please use TkPackage.require to > load the library. If succeed, the library will be loaded and > 'togl' command will be defined on the Tk interpreter. After that, > togl.rb will work fine. Almost there. bard@prism:~/workspace/ruby/Togl-1.6$ tclsh % package require Togl can't find package Togl % load togl.so couldn't load file "togl.so": togl.so: cannot open shared object file: No such file or directory % load ./togl.so % package require Togl 1.6 This means that it is built as a loadable module. I then copied togl.so over to /usr/lib and ran: bard@prism:~/workspace/ruby/Togl-1.6$ irb irb(main):001:0> require 'tk' true irb(main):002:0> TkPackage.require('togl') RuntimeError: can't find package togl from /usr/lib/ruby/1.6/tk.rb:889:in `_invoke' from /usr/lib/ruby/1.6/tk.rb:889:in `_invoke' from /usr/lib/ruby/1.6/tk.rb:596:in `tk_call' from /usr/lib/ruby/1.6/tk.rb:642:in `require' from (irb):2 irb(main):003:0> TkPackage.require('Togl') RuntimeError: can't find package Togl from /usr/lib/ruby/1.6/tk.rb:889:in `_invoke' from /usr/lib/ruby/1.6/tk.rb:889:in `_invoke' from /usr/lib/ruby/1.6/tk.rb:596:in `tk_call' from /usr/lib/ruby/1.6/tk.rb:642:in `require' from (irb):3 irb(main):004:0> require 'togl' true irb(main):005:0> TkPackage.require('togl') RuntimeError: can't find package togl from /usr/lib/ruby/1.6/tk.rb:889:in `_invoke' from /usr/lib/ruby/1.6/tk.rb:889:in `_invoke' from /usr/lib/ruby/1.6/tk.rb:596:in `tk_call' from /usr/lib/ruby/1.6/tk.rb:642:in `require' from (irb):5 irb(main):006:0> TkPackage.require('Togl') RuntimeError: can't find package Togl from /usr/lib/ruby/1.6/tk.rb:889:in `_invoke' from /usr/lib/ruby/1.6/tk.rb:889:in `_invoke' from /usr/lib/ruby/1.6/tk.rb:596:in `tk_call' from /usr/lib/ruby/1.6/tk.rb:642:in `require' from (irb):6 Can you please tell me where togl.so should be put for TkPackage.require to find it? Unfortunately README.euc is of no help since I cannot read Japanese and I have no experience with Tcl/Tk. Thank you. Massimiliano