prog james
2009-Mar-11 11:44 UTC
[fxruby-users] FXRuby-1.6.19 don''t run in ruby1.9.1 on windows.
I built fxruby-1.6.19 in win32 using msys + mingw tools. The process of doing it is ok and generate a file fox16.so in the directory ext\fox16. But when i require ''fox16'', it fails to work. it reports that "LoadError: 127. The specified procedure could not be found . - Init_fox16 C:/ruby_1.9.1/usr/local/lib/ruby/site_ruby/1.9.1/i386-msvcrt/fox16.so ". how can i resolve it? thanks. OS: windows Ruby: ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mingw32] -- View this message in context: http://www.nabble.com/FXRuby-1.6.19-don%27t-run-in-ruby1.9.1-on-windows.-tp22451035p22451035.html Sent from the FXRuby Users mailing list archive at Nabble.com.
Lyle Johnson
2009-Mar-11 16:06 UTC
[fxruby-users] FXRuby-1.6.19 don''t run in ruby1.9.1 on windows.
On Mar 11, 2009, at 6:44 AM, prog james wrote:> I built fxruby-1.6.19 in win32 using msys + mingw tools. > The process of doing it is ok and generate a file fox16.so in the > directory > ext\fox16. > But when i require ''fox16'', it fails to work. it reports that > "LoadError: > 127. The specified procedure could not be found . - Init_fox16 > C:/ruby_1.9.1/usr/local/lib/ruby/site_ruby/1.9.1/i386-msvcrt/ > fox16.so ". > how can i resolve it? thanks.I don''t have MinGW set up anymore and I''m not really inclined to do so until that becomes the new standard distribution for Ruby on Windows. If you come up with a solution to this problem and would like to submit a patch to fix it, I''d be glad to include that in a future release of FXRuby.
prog james
2009-Mar-12 01:57 UTC
[fxruby-users] FXRuby-1.6.19 don''t run in ruby1.9.1 on windows.
I resolved it. the problem is that no export function in the fox16.so file in Windows OS. So we must add a export attribute in the function Init_fox16 . I change the follow line in file FXRuby.cpp extern "C" void Init_fox16(void) into extern "C" void __attribute__ ((dllexport)) Init_fox16(void). then recompile it and link. then it works well now. Lyle Johnson-4 wrote:> > > On Mar 11, 2009, at 6:44 AM, prog james wrote: > >> I built fxruby-1.6.19 in win32 using msys + mingw tools. >> The process of doing it is ok and generate a file fox16.so in the >> directory >> ext\fox16. >> But when i require ''fox16'', it fails to work. it reports that >> "LoadError: >> 127. The specified procedure could not be found . - Init_fox16 >> C:/ruby_1.9.1/usr/local/lib/ruby/site_ruby/1.9.1/i386-msvcrt/ >> fox16.so ". >> how can i resolve it? thanks. > > I don''t have MinGW set up anymore and I''m not really inclined to do so > until that becomes the new standard distribution for Ruby on Windows. > If you come up with a solution to this problem and would like to > submit a patch to fix it, I''d be glad to include that in a future > release of FXRuby. > _______________________________________________ > fxruby-users mailing list > fxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/fxruby-users > >-- View this message in context: http://www.nabble.com/FXRuby-1.6.19-don%27t-run-in-ruby1.9.1-on-windows.-tp22451035p22468445.html Sent from the FXRuby Users mailing list archive at Nabble.com.
Lyle Johnson
2009-Mar-12 13:56 UTC
[fxruby-users] FXRuby-1.6.19 don''t run in ruby1.9.1 on windows.
On Mar 11, 2009, at 8:57 PM, prog james wrote:> I resolved it. the problem is that no export function in the > fox16.so file in > Windows OS. > So we must add a export attribute in the function Init_fox16 . > > I change the follow line in file FXRuby.cpp > extern "C" void Init_fox16(void) > into > extern "C" void __attribute__ ((dllexport)) Init_fox16(void). > > then recompile it and link.Thanks! I am going to try to figure out how to add this attribute in a cross-platform way (i.e. so that adding it doesn''t break the build for other compilers and OS''s).
David MacMahon
2009-Mar-12 17:14 UTC
[fxruby-users] FXRuby-1.6.19 don''t run in ruby1.9.1 on windows.
On Mar 12, 2009, at 6:56 , Lyle Johnson wrote:>> I change the follow line in file FXRuby.cpp >> extern "C" void Init_fox16(void) >> into >> extern "C" void __attribute__ ((dllexport)) Init_fox16(void). >> >> then recompile it and link. > > Thanks! I am going to try to figure out how to add this attribute > in a cross-platform way (i.e. so that adding it doesn''t break the > build for other compilers and OS''s).How/why did this work before with Ruby 1.8? Just curious, Dave
Lyle Johnson
2009-Mar-12 19:00 UTC
[fxruby-users] FXRuby-1.6.19 don''t run in ruby1.9.1 on windows.
On Mar 12, 2009, at 12:14 PM, David MacMahon wrote:> How/why did this work before with Ruby 1.8?I don''t know that it ever did. I''ve never tried to build with MinGW; I use Visual C++ to build FXRuby for Windows.