From: Luis Lavena Date: 2010-07-22T01:05:27+09:00 Subject: [ruby-core:31409] Re: --export-all revisited On Wed, Jul 21, 2010 at 12:55 PM, Roger Pack wrote: >>> However this requires *all* authors who want their gems to compile on >>> windows to add this rather ugly, non-intuitive block: >> >> Instead .def file should be used. �Isn't it created? > > I am unfamiliar with .def files. > definition files, contains the whitelist of functions to be exported from a DLL. > C:\dev\PIG-2.3>gem install rjb > Building native extensions. �This could take a while... > >>> require 'rjb' > LoadError: 127: The specified procedure could not be found. � - Init_rjbcore > c:/ruby19/lib/ruby/gems/1.9.1/gems/rjb-1.2.5/lib/rjbcore.so > � � � �from c:/ruby19/lib/ruby/site_ruby/1.9.1/faster_rubygems/prelude_cached_load.rb:6:in > `require' > > (Init_rjbcore was not exported...). > It occurs with some gems and not with others. > Please provide a simple example, a simple extension, and include the specific ruby version (ruby -v) so we can reproduce. My testing with different version: http://gist.github.com/484676 C:\Users\Luis\Projects\_sandbox\ext-test>ruby -I. -ve "require 'testing'" ruby 1.8.7 (2010-06-23 patchlevel 299) [i386-mingw32] testing loaded C:\Users\Luis\Projects\_sandbox\ext-test>ruby -I. -ve "require 'testing'" ruby 1.9.1p429 (2010-07-02 revision 28523) [i386-mingw32] testing loaded There is no def file... exported symbols are correct. C:\Users\Luis\Projects\_sandbox\ext-test>ruby -I. -ve "require 'testing'" ruby 1.9.2dev (2010-07-02) [i386-mingw32] testing loaded C:\Users\Luis\Projects\_sandbox\ext-test>cat testing-i386-mingw32.def EXPORTS Init_testing Seems that simple scenarios work, but not all the time. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup�ry