[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Borland C++ Builder Uses __WIN32__, Not WIN32

From: Alexander J. Oss
Subject: Borland C++ Builder Uses __WIN32__, Not WIN32
Date: Mon, 25 Mar 2002 02:11:51 -0500

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?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]