Quoting Austin Ziegler <halostatue / gmail.com>: > On 6/25/05, james / jamesjrg.com <james / jamesjrg.com> wrote: >> Quoting Austin Ziegler <halostatue / gmail.com> : >> > On 6/25/05, james / jamesjrg.com <james / jamesjrg.com> wrote: >>>> win32.h defines a load of macros. This means any C or C++ >>>> program which embeds ruby cannot have variables, functions or >>>> member functions with the same name as these macros. So you >>>> cannot have functions or variables with such common names as >>>> "accept", "bind", "connect", "send", "shutdown" etc. Is it not >>>> possible to implement the Windows version of the Ruby header >>>> files without macros? >>> These names would need to exist in the global namespace in any >>> case (at least accept(), bind(), connect(), and send()) because >>> they're used for network communications. >> But MyClass::connect does not conflict with ::connect > > I'll grant that, but note that Ruby is a C application and as such, > there's only the one global namespace (effectively), and ::connect > is an invalid syntactic in C. I'm not saying the problem couldn't be > fixed, but suggesting why it might be a lower priority. For C > programs, these macros aren't problematic (sorry, but they aren't -- > they're reality). For C++ programs, they probably are, but you might > be better suited to using Ruby as a DLL. I don't know, honestly, > what would be involved in doing that, but that would probably be a > better way to handle this. Maybe I misunderstand, but surely even if you use it as a dll you still need to include the header files? Anyway, my solution was just to delete the macros in my copy of the file. > And, to be honest, there are bigger problems with the Windows > version of Ruby than these names; the fact that there's no support > for Unicode filesystem operations in Ruby is a far bigger problem to > me than embedding issues. OK, fair enough, James