Mail Archives: djgpp/1997/11/11/22:02:37
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 -