X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: GNU preprocessor problem? Date: 26 Feb 2002 14:05:39 GMT Organization: Aachen University of Technology (RWTH) Lines: 40 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1014732339 28643 137.226.32.75 (26 Feb 2002 14:05:39 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 26 Feb 2002 14:05:39 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Dong Soo Kim wrote: [... some line breaks inserted for readibility] > RSXNTDJ=D:\DJGPP\RSXNTDJ > C_INCLUDE_PATH=D:\DJGPP\RSXNTDJ\include\win32\anders; > PATH=C:\JDK1.3\BIN;C:\TMP\HOME;C:\ATACR;D:\DJGPP\BIN;D:\DJGPP\RSXNTDJ\BIN; > C:\WINDOWS;C:\WINDOWS\COMMAND;C:\PROGRA~1\ULTRAE~1;D:\COMP;D:\JPEG > DJGPP=D:\DJGPP\DJGPP.ENV This combination of three variables almost certainly is the root of your problem. The order of paths is wrong if RSXNTDJ is your currently used compiler (djgpp\rsxntdj\bin should come _before_ djgpp\bin), whereas C_INCLUDE_PATH should never be set this way if you're trying to use DJGPP itself. > .. don't see anything to do with other gcc windows ports there. There is none. The problem is between RSXNTDJ and DJGPP. > #include's) has _WINDOWS_H anywhere in them. Really weird imo. But it > seems you can check for _WINDOWS_H in order to verify that the win32 api > is available. Actually, you should rely on neither of these. The proper #define to check whether you're on a Windows platform is _Windows, in my experience. Others may also work. A look at gcc -v output to see the predefined macros passed by gcc.exe to cpp.exe should be enlightening. The _WINDOWS_H macro is meant for a different purpose, and shouldn't be abused for this kind of check. It's quite useless anyway: it just moves the problem instead of solving it: it's still up to the programmer to guarantee that #include has been done *before* #include "errout.h". Checking whether to do that or not, in the calling source file, is exactly as hard has deciding which of to alternative headers "errwin.h" and "errdos.h" to #include. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.