Forums Archived

The forums are being archived. See this topic for more information.

could not load SDL (loadError

Get help and support with Rubygame

could not load SDL (loadError

Postby theprojectabot » Mon Oct 11, 2010 7:02 pm

I get the following if i attempt to run a very basic tutorial from here:

http://manwithcode.com/322/making-games ... -3-basics/

on a macbook pro 2009
thanks for any help

link-mbp:Ruby benb$ ruby /Users/benb/Programming/Ruby/rubygame_basics.rb
/Library/Ruby/Gems/1.8/gems/nice-ffi-0.4/lib/nice-ffi/library.rb:98:in `load_library': Could not load SDL. (LoadError)
from /Library/Ruby/Gems/1.8/gems/ruby-sdl-ffi-0.3/lib/ruby-sdl-ffi/sdl.rb:51
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/rubygame-2.6.4/lib/rubygame/main.rb:22
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Library/Ruby/Gems/1.8/gems/rubygame-2.6.4/lib/rubygame.rb:44
from /Library/Ruby/Gems/1.8/gems/rubygame-2.6.4/lib/rubygame.rb:29:in `each'
from /Library/Ruby/Gems/1.8/gems/rubygame-2.6.4/lib/rubygame.rb:29
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:36:in `require'
from /Users/benb/Programming/Ruby/rubygame_basics.rb:2
theprojectabot
 
Posts: 2
Joined: Mon Oct 11, 2010 7:00 pm

Re: could not load SDL (loadError

Postby theprojectabot » Mon Oct 11, 2010 7:19 pm

well I read another post and they said you must use rsdl instead of ruby as the interpretrer...

so I tried to install rsdl and I get this:


link-mbp:rsdl benb$ sudo gme install rsdl
sudo: gme: command not found
link-mbp:rsdl benb$ sudo gem install rsdl
Building native extensions. This could take a while...
ERROR: Error installing rsdl:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
sh: sdl-config: command not found
sh: sdl-config: command not found
checking for ruby_sysinit()... no
checking for ruby_run_node()... no
creating Makefile
creating rsdl.c

make
gcc -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -I"/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0" -c rsdl.c
rsdl.c:4:17: error: SDL.h: No such file or directory
rsdl.c:5:22: error: SDL_main.h: No such file or directory
rsdl.c:4:17: error: SDL.h: No such file or directory
rsdl.c:5:22: error: SDL_main.h: No such file or directory
lipo: can't open input file: /var/tmp//ccTSnP7R.out (No such file or directory)
make: *** [rsdl.o] Error 1
theprojectabot
 
Posts: 2
Joined: Mon Oct 11, 2010 7:00 pm

Re: could not load SDL (loadError

Postby indspenceable » Wed Oct 13, 2010 12:07 am

Do you have SDL on your system? It seems like you might not - you are getting an error when trying to load SDL in your first post, and the second one says that you can't find the header files for SDL.

If you use macports, you want to do sudo port install libsdl to get it. Then try sudo gem install rsdl again.
indspenceable
 
Posts: 8
Joined: Fri Jun 18, 2010 7:47 am


Return to Help & Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron