delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/11/22:02:37

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Unclear Error Message
Date: Wed, 12 Nov 1997 09:23:32 +0000
Organization: Two pounds of chaos and a pinch of salt
Lines: 33
Message-ID: <34697594.7679@cs.com>
References: <34666FFC DOT 6916 AT cs DOT huji DOT ac DOT il>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp218.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Ofer Corshid wrote:
> 
> Thanking anyone who can and will answer this:
> When I compile my program with "make" after each outputed
> line whilc compiling, line such as:
> gxx -g -c myfile.cc
> I get these 3 messages:
> gcc.exe: -lgpp: linker input file unused since linking not done
> gcc.exe: -lstdcx: linker input file unused since linking ...
> gcc.exe: -lm: linker input file ....
> 
> What does this mean?
> How can I avoid this?

gxx is simply a wrapper for gcc that adds the standard C++ libraries to
the end of the command line, and then invokes gcc.  The problem is that,
when you do this in conjunction with the '-c' switch, you are telling
gcc to produce object code output, but also specifying libraries to link
on the command line.  Obviously, since the linker is never called,
nothing is done with the libraries, but gcc tells you this in case you
didn't realize it.

gxx is only needed when _linking_ C++ programs, or when compiling and
linking simultaneously.  In that makefile, you should use gcc to
compile, and use gxx only when linking the final executable.

-- 
---------------------------------------------------------------------
|      John M. Aldrich       | "History does not record anywhere at |
|       aka Fighteer I       | any time a religion that has any     |
|   mailto:fighteer AT cs DOT com   | rational basis."                     |
| http://www.cs.com/fighteer |                - Lazarus Long        |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019