[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Woody: What's the proper name of the C++ lib?



On Thu, Sep 19, 2002 at 03:05:05PM +0200, Holger Rauch wrote:
> On Thu, 19 Sep 2002, Colin Watson wrote:
> > Just use g++ rather than gcc ...
> 
> That's what I did. Still keep getting the linker error, though. That's the
> reason why I thought of using of some special C++ lib in order to get rid
> of the linker error.

Hm. I've never seen this, and I build C++ code all the time ... if you
were missing a library then you'd get undefined references, not a crash,
like this:

  $ cat foo.cpp 
  #include <iostream>
  int main() {
     cout << "hello, world!\n";
  }
  $ gcc foo.cpp
  /tmp/cc2su6Vb.o: In function `main':
  /tmp/cc2su6Vb.o(.text+0xf): undefined reference to `cout'
  /tmp/cc2su6Vb.o(.text+0x14): undefined reference to `ostream::operator<<(char const *)'
  collect2: ld returned 1 exit status
  $ g++ foo.cpp
  $ ./a.out 
  hello, world!
  $ 

I'd file a bug with a test case.

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: