Subject: RE: gcc problem
From: [email-masked] (Colin Peters)

20 Oct 1997 20:38:07 -0700
Message-ID: <01BCDDFA.464DD640.cygnus.gnu-win32@gbird0>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
To: "[email-masked]'" <[email-masked]>
Cc: "'GNU-Win32'" <[email-masked]>

Frank Packenham[SMTP:[email-masked]] 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
-- [email-masked] - 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
"[email-masked]" with one line of text: "help".