Hi,
In message "Re: [ruby-core:19043] Ruby is "stealing" names from operating system API:s"
on Tue, 30 Sep 2008 21:27:53 +0900, "Johan Holmberg" <johan556 / gmail.com> writes:
|I have tried to extend/embed Ruby on Windows, but soon I encountered
|problems. Ruby redefines several function names "owned" by the API:s
|of the operating system and names used in C/C++ runtime library
|headers files. This can lead to compilation errors and/or linking
|errors. I think the main problem is the use of #define to re-define
|some symbols to suit Ruby without taking into account that Ruby
|doesn't own the symbols. This practice to steal the symbols is perhaps
|not a problem when building Ruby itself. But when extending/embedding
|it causes real problems.
It's the Win32 port specific problem. We should fix it somehow in the
future. Until then, try including C++ header files before Ruby
related headers. It would make the situation slightly better.
matz.