Mail Archives: djgpp/2002/02/26/09:15:23
Dong Soo Kim <dsk666 AT cse DOT unsw DOT edu DOT au> 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 <windows.h> 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.
- Raw text -