Steven J. Zeil
Tue Oct 21 07:44:00 GMT 1997
On Tue, 21 Oct 1997, Colin Peters wrote:
> Frank Packenham[SMTP:Etc@Weirdness.com] wrote:
> >Well the install seemed to go well, but when I try to compile ( or make )
> >anything this is the result.
> >bash$ gcc laws.c
> >Borland C++ Preprocessor Version 4.00 Copyright (c) 1993 Borland
> >Error: Incorrect command line option: -undef
> >gcc: Internal compiler error: program cpp got fatal signal 1
> The problem, mainly, is that gcc is expecting to call the GNU version of
> cpp, and it's getting the Borland version (you have a Borland compiler
> installed, correct?). Cpp is the preprocessor, and it gets passed many
> options you give on the gcc command line, as well as lots of options
> internal to the two. Obviously Borland's cpp, while a program with the
> same purpose, doesn't have the same command line syntax, and nothing
> Solutions include:
> - Setting up your environment so GNU cpp is earlier on the path and/or
> Borland's is not. You might do this with a pair of batch files or
> shell scripts for switching between "environments" (I like to set
> up icons which run the correct batch file and start a dos shell in
> such circumstances).
This will, however, prevent Borland's compiler from working, as it will
then try to access the GNU cpp instead of its own.
I've run into many similar clashes between $PATH and other environment
variables. The solution I have evolved is this:
In autoexec.bat, set up a baseline path that does not include ANY of the
conflicting programs' binary directories:
PATH c:\bin;c:\windows;...and so on...
Then set up a series of utility batch files to augment the path with the
binary directories for a given program. For example, I have usegcc.bat:
... may wish to set other gcc environment variables here instead of in
and I have usebcc.bat:
and a similar script for Visual C++.
Then I can simply type
at an MSDOS prompt before starting to work with any compiler.
For enthusiasts of double-click program launching, create a batch file
and bind that, rather than the bcw program itself, to the Borland .ide
For help on using this list (especially unsubscribing), send a message to
"email@example.com" with one line of text: "help".
More information about the Cygwin