From: Lyle Johnson Date: 2002-10-10T01:52:09+09:00 Subject: Re: Compiling using IMPORT, NT=1 Marco K�gler wrote: > I hope this is the right mailing list for this (might belong more to > core). As a lot of people, I encountered some problems when adding the > ruby import library manually to my project. Defining IMPORT and NT=1 > solved those problems (thank God for the mailing list archives). But, > this introduces another really nasty problem. Those defines trigger the > inclusion of the win32/win32.h file. This file does a bunch of defines > of the sort: > > #define eof _eof I agree with you that this is a problem. In the FXRuby sources, I have to do a lot of hand-waving to "fix back" the symbols that the Ruby header files redefine. For example, one of the C++ class member functions that we need to call is named "select()": class FXGLViewer { ... virtual FXGLObject** select(FXint x,FXint y,FXint w,FXint h); ... }; but since the Ruby header files redefine "select" to "_select", the call fails. The only workaround I've come up with is (as you showed) to undefine the offending symbols after having included the Ruby headers, i.e. #include "ruby.h" #ifdef select #undef select #endif #ifdef open #undef open #endif /* and so on */ > Both solutions are not really satisfactory. Does somebody know what the > exact purpose of the win32/win32.h file is? It seems a bit like an > emulation layer, but that problem should probably be solved in code, not > in a header file. Definitely agree.