FXRuby-1.6.19 don't run in ruby1.9.1 on windows.

View: New views
7 Messages — Rating Filter:   Alert me  

FXRuby-1.6.19 don't run in ruby1.9.1 on windows.

by prog james :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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]

Re: FXRuby-1.6.19 don't run in ruby1.9.1 on windows.

by Lyle Johnson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...
http://rubyforge.org/mailman/listinfo/fxruby-users

Re: FXRuby-1.6.19 don't run in ruby1.9.1 on windows.

by prog james :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@rubyforge.org
http://rubyforge.org/mailman/listinfo/fxruby-users

Re: FXRuby-1.6.19 don't run in ruby1.9.1 on windows.

by Lyle Johnson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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).
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

Re: FXRuby-1.6.19 don't run in ruby1.9.1 on windows.

by David MacMahon :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

Re: FXRuby-1.6.19 don't run in ruby1.9.1 on windows.

by Lyle Johnson-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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.
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

Re: FXRuby-1.6.19 don't run in ruby1.9.1 on windows.

by rherror404 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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).

Awesome.  I've been bashing my head against this for a while.  I need to be able to get FXRuby and 1.9.x (on win32) working with a simple "gem update" for a variety of reasons.  How is this progressing?

Thanks.