Borland C++ Builder Uses __WIN32__, Not WIN32
"Alexander J. Oss" <[email protected]>
| Newsgroups | gmane.comp.gcc.cgicc.general |
|---|---|
| Message-ID | <001f01c1d3cc$56e630c0$0101a8c0@puter> |
In compiling cgicc 3.2.1 with BCB 5.0, still attempting to find out what's going on that causes a GPF on startup before we get to main(), I've found that there are some "#ifdef WIN32" preprocessor directives which, unfortunately, do not yield the expected results, since BCB defines __WIN32__, not WIN32. If I manually define WIN32 as part of the project options, all compiles well; otherwise I get compiler errors in cgicc.cpp when the macros VERSION and HOST are not found. Perhaps #if defined(WIN32) || defined(__WIN32__) is needed, instead, although I'd be surprised if other compiler vendors define WIN32 without any leading underscores. (Still haven't installed my play-toy copy of VC++!) This leads me to a question which doesn't really affect me, but I'm curious: on non-Win32 platforms, how do the getVersion() and getHost() methods compile successfully if HOST and VERSION aren't defined anywhere? Or is there some "configure" installation-time magic that occurs?