GCC, C++, and broken linking

Forside
Vedhæftede filer:
Indlæg som e-mail
+ (text/plain)
Slet denne besked
Besvar denne besked
Skribent: Kurt Granroth
Dato:  
Emne: GCC, C++, and broken linking
On Wednesday 08 January 2003 08:46 pm, Bryce C wrote:
> c++ -DHAVE_CONFIG_H -I. -I. -I..     -Wall -Wimplicit -Wreturn-type
> -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wtraditional
> -Wpointer-arith -Wmissing-prototypes      -O1      -g -c main.cc
> /bin/sh ../libtool --mode=link c++  -Wall -Wimplicit -Wreturn-type
> -Wunused -Wswitch -Wcomment -Wuninitialized -Wparentheses -Wtraditional
> -Wpointer-arith -Wmissing-prototypes      -O1      -g  -o ch  main.o
> c++ -Wall -Wimplicit -Wreturn-type -Wunused -Wswitch -Wcomment
> -Wuninitialized -Wparentheses -Wtraditional -Wpointer-arith
> -Wmissing-prototypes -O1 -g -o ch main.o

>
>
> I don't know how correct all that is but it's the relevant part of
> make's. This is from a project in Anjuta (http://anjuta.sf.net).


WOAH!! Talk about using a sledgehammer with a thumbtack! ;-)

All that is never intended to be called from the command line. It's
autogenerated Makefile code from an automake/autoconf app that uses
libtool. If you tried to type that out on the command line yourself, you
would quickly find that it wouldn't work.

The only relevant parts (to the current problem) are this:

c++ -c main.cc
c++ -o ch main.o

And even that's overkill for quickly compiling one simple file.

c++ -o ch main.cc
--
Kurt Granroth - "KDE -- Conquer Your Desktop"
KDE Developer/Evangelist |
http://www.granroth.org |