Mail Archives: djgpp/1999/10/27/10:37:29
In article <Pine DOT SUN DOT 3 DOT 91 DOT 991027094413 DOT 27176G-100000 AT is> you wrote:
> On 26 Oct 1999, Hans-Bernhard Broeker wrote:
> > Do *not* set environment variables like 'C_INCLUDE_PATH' directly,
> > or you'll be in trouble.
> What trouble will happen if C_INCLUDE_PATH is set directly, and why?
Well, I did at least once see someone who had guessed he should set
C_INCLUDE_PATH to the include directory of RSXNTDJ (or maybe it was
the M$ Platform SDK one, don't remember too exactly). The pre-existing
C_INCLUDE_PATH is respected by the stock DJGPP.ENV:
C_INCLUDE_PATH=%/>;C_INCLUDE_PATH%%DJDIR%/include
This lead to a plain DJGPP compilation seeing the RSXNTDJ headers,
with all the troubles you get from that. The problem is that an
environment variable will be used by *both* RSXNTDJ and DJGPP, once
it's been set, and it will usually cause (at least) one of them to
stop working properly.
The only exception from this rule would be headers of truly portable
libraries which can, in principle, be used by more than one compiler,
unchanged. But even then, you must look out not to set LIBRARY_PATH
(which I hinted at by the 'variables like' phrase, in my original
article) in the environment, or you'll most likely be in trouble,
again.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -