From: Wim Vander Schelden Date: 2006-12-29T18:13:33+09:00 Subject: Re: Ruby extension issue Eric Hodel wrote: > On Dec 28, 2006, at 14:39, Wim Vander Schelden wrote: >> Eric Hodel wrote: >>> On Dec 28, 2006, at 13:45, Wim Vander Schelden wrote: >>> >>>> I was able to fix the problem by changing my extconf.rb to: >>>> >>>> However, I don't know *WHY* it works. The pkg_config seems to be >>>> the crucial line. >>>> I just went through other people's extconf.rb files and guessed the >>>> "sdl" value. >>>> Any help would be appreciated, since there seems to be no >>>> documentation about >>>> pkg_config... >>> >>> $ ruby extconf.rb >>> checking for SDL_Init() in -lSDL... no >>> checking for SDL/SDL.h... no >>> creating Makefile >>> $ >>> >>> You should never call create_makefile makefile when required >>> libraries and headers can't be found. >> >> Ok thanks :) Could you also explain what these methods do exactly? > >> require 'mkmf' >> >> dir_config('gamer') > > dunno > >> have_library("SDL", "SDL_Init") > > Do we have an SDL_Init() declared in libSDL.so (platform dependent)? > Returns true or false if it was found or not. Check the return value > and abort if false and you need this library. > >> have_header("SDL/SDL.h") > > Do we have an SDL/SDL.h file lying around somewhere? Returns true or > false if it was found or not. Check the return value and abort if > false and you need this library. > >> pkg_config("sdl") > > dunno > >> create_makefile('gamer') > > creates a Makefile that will build gamer.so > > --Eric Hodel - drbrain@segment7.net - http://blog.segment7.net > > I LIT YOUR GEM ON FIRE! > > > Thank you, but my main problem is the pkg_config :-( Well for now I'll just be happy that it works :-) Wim -- Wim Vander Schelden Bachelor Computer Science, University Ghent http://nanoblog.ath.cx My weblog, powered by Ruby and BSD licensed.