gcc problem

Colin Peters colin@bird.fu.is.saga-u.ac.jp
Mon Oct 20 19:25:00 GMT 1997


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
 ^^^^^^^
>International
>Error: Incorrect command line option: -undef
>gcc: Internal compiler error: program cpp got fatal signal 1
>
>-undef is described in the UNIX man page for gcc. More importantly though,
>why is it trying to use this option, as you can see, I am not specifying it
>at the command line.

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
works.

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).

 - Removing the Borland install entirely (probably not a good option).

 - Setting up GNU's LIBRARY_PATH so that cpp can be found in it. This
   may not work, as gcc might search the main PATH first before trying
   these "default" places.

Probably the best bet is the "separate environments" way.

Colin.

-- Colin Peters - Saga Univ. Dept. of Information Science
-- colin@bird.fu.is.saga-u.ac.jp - finger for PGP public key
-- http://www.fu.is.saga-u.ac.jp/~colin/index.html
-- http://www.geocities.com/Tokyo/Towers/6162/

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list