Hello,
I am new to both Ruby and Gosu. (I have been programming in C++ for over 5 years now, as well as in many other languages, but had never had the time to learn Ruby up until now.) I am running openSUSE 11.3 (64 bit), and I have installed Ruby 1.8.7 as well as Gosu 7.22 (through RubyGems). As a test, I copied and pasted in the first application in the Gosu Ruby tutorial, and added "require 'rubygems'" to the beginning:
require 'rubygems'
require 'gosu'
class GameWindow < Gosu::Window
def initialize
super(640, 480, false)
self.caption = "Gosu Tutorial Game"
end
def update
end
def draw
end
end
window = GameWindow.new
window.show
When I try to run the application, I get the following error:
/home/kota/.gem/ruby/1.8/gems/gosu-0.7.22/lib/gosu.so: /home/kota/.gem/ruby/1.8/gems/gosu-0.7.22/lib/gosu.so: undefined symbol: _ZTVN10__cxxabiv121__vmi_class_type_infoE - /home/kota/.gem/ruby/1.8/gems/gosu-0.7.22/lib/gosu.so (LoadError)
from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in require'
from /home/kota/.gem/ruby/1.8/gems/gosu-0.7.22/lib/gosu.rb:12
from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in
gem_original_require'
from /usr/lib64/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /home/kota/NetBeansProjects/HelloGosu/lib/main.rb:2
I have also tried installing it from source, under openSUSE 11.2, and under Ubuntu 10.04, and several different versions of Gosu, all without luck.
If anyone could give me a pointer to what I am doing wrong, I would highly appreciate it!
Thanks!
Hmm ok, so I tried doing a make and make install under my openSUSE 11.3 machine (I want to get familiar with Gosu first in C++ as that is my 'native tongue') and I was hit with the following error:
/tmp/ccccW7hN.o: In function main':
Tutorial.cpp:(.text+0x66): undefined reference to
Gosu::Sample::~Sample()'
/tmp/ccccW7hN.o: In function GameWindow::update()':
Tutorial.cpp:(.text._ZN10GameWindow6updateEv[GameWindow::update()]+0x3c8): undefined reference to
Gosu::Sample::play(double, double, bool) const'
/tmp/ccccW7hN.o: In function GameWindow::~GameWindow()':
Tutorial.cpp:(.text._ZN10GameWindowD2Ev[_ZN10GameWindowD5Ev]+0x4e): undefined reference to
Gosu::Sample::~Sample()'
/tmp/ccccW7hN.o: In function GameWindow::~GameWindow()':
Tutorial.cpp:(.text._ZN10GameWindowD0Ev[_ZN10GameWindowD5Ev]+0x4e): undefined reference to
Gosu::Sample::~Sample()'
/tmp/ccccW7hN.o: In function void boost::checked_delete<Gosu::Sample>(Gosu::Sample*)':
Tutorial.cpp:(.text._ZN5boost14checked_deleteIN4Gosu6SampleEEEvPT_[void boost::checked_delete<Gosu::Sample>(Gosu::Sample*)]+0xa): undefined reference to
Gosu::Sample::~Sample()'
/tmp/ccccW7hN.o: In function GameWindow::GameWindow()':
Tutorial.cpp:(.text._ZN10GameWindowC2Ev[_ZN10GameWindowC5Ev]+0x228): undefined reference to
Gosu::Sample::Sample(Gosu::Audio&, std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&)'
Tutorial.cpp:(.text._ZN10GameWindowC2Ev[_ZN10GameWindowC5Ev]+0x242): undefined reference to `Gosu::Sample::~Sample()'
collect2: ld returned 1 exit status
make: *** [/home/kota/SDK/Gosu/gosu/linux/../examples/Tutorial] Error 1
Any ideas? I am using GNU gcc 4.5
Thanks!
Loading...