[#5563] Non-overridable and non-redefinable methods — Eric Mahurin <eric_mahurin@...>

Lately, I've been thinking about the future of ruby

44 messages 2005/08/19
[#5564] Re: Non-overridable and non-redefinable methods — Austin Ziegler <halostatue@...> 2005/08/19

On 8/19/05, Eric Mahurin <eric_mahurin@yahoo.com> wrote:

[#5571] Re: Non-overridable and non-redefinable methods — Eric Mahurin <eric_mahurin@...> 2005/08/19

--- Austin Ziegler <halostatue@gmail.com> wrote:

[#5574] Re: Non-overridable and non-redefinable methods — TRANS <transfire@...> 2005/08/20

Just wanted to add a few things.

[#5581] Re: Non-overridable and non-redefinable methods — Austin Ziegler <halostatue@...> 2005/08/20

On 8/19/05, TRANS <transfire@gmail.com> wrote:

[#5583] Re: Non-overridable and non-redefinable methods — "David A. Black" <dblack@...> 2005/08/20

Hi --

[#5585] Re: Non-overridable and non-redefinable methods — Eric Mahurin <eric_mahurin@...> 2005/08/20

--- "David A. Black" <dblack@wobblini.net> wrote:

[#5609] Pathname#walk for traversing path nodes (patch) — ES <ruby-ml@...>

Here is a small addition to Pathname against 1.9, probably suited

20 messages 2005/08/22

[ ruby-Bugs-2206 ] Building ruby extensions with MingW broken

From: noreply@...
Date: 2005-08-04 06:11:15 UTC
List: ruby-core #5528
Bugs item #2206, was opened at 2005-08-04 00:05
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=2206&group_id=426

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Charlie Savage (cfis)
Assigned to: Nobody (None)
Summary: Building ruby extensions with MingW broken

Initial Comment:
Setup - Windows XP sp2, windows ruby 1.8.2 build, mingw with gcc 3.4.4

When I build an extension called "my_test" (from the pick axe book) using mingw I get an error when loading the extension:

$ ruby -C . -e "require 'my_test'"
./my_test.so: wrong argument type Fixnum (expected Class) (TypeError)
from c:/Development/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require' from -e:1

Digging into this, it happens because __declspec(dllimport) is not being set correctly because of these lines in defines.h:

#undef RUBY_EXTERN
#if defined _WIN32 && !defined __GNUC__
# ifndef RUBY_EXPORT
# define RUBY_EXTERN extern __declspec(dllimport)
# endif
#endif

__GNUC__ is true, thus the __declspec(dllimport) is not included.

A simple fix could be: 

#if defined _WIN32  && (!defined __GNUC__ || defined __declspec)

-or- 

# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) || define(__MINGW32__)

And I'm sure there are others.

Note I originally reported this to the Mingw list.  For a lot more detailed information please see:

https://sourceforge.net/tracker/?func=detail&atid=102435&aid=1251320&group_id=2435

Thanks,

Charlie

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=2206&group_id=426

In This Thread

Prev Next