delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/04/12:22:58

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 4 Jan 2002 17:41:45 +0100
From: "Gerrit P. Haase" <gp AT familiehaase DOT de>
X-Mailer: The Bat! (v1.53t) Business
Reply-To: "Gerrit P. Haase @ cygwin" <cygwin AT cygwin DOT com>
Organization: Esse keine toten Tiere
X-Priority: 3 (Normal)
Message-ID: <12703577.20020104174145@familiehaase.de>
To: "Parker, Ron" <rdparker AT butlermfg DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: C++ Link Errors
In-Reply-To: <E94FF01DFF6CD31186F4080009DC361503F83DF3@nttwr2.tower.bldgs.butlermfg.org>
References:
<E94FF01DFF6CD31186F4080009DC361503F83DF3 AT nttwr2 DOT tower DOT bldgs DOT butlermfg DOT org>
MIME-Version: 1.0

Hallo Ron,

Am 2002-01-03 um 18:51 schriebst du:

> I am trying to build the Linux UML modeler with cygwin. Everything works
> until I link. Libtool tries adding -ldl to the g++ linking call.  If I enter
> g++ command by hand without the -ldl everything is fine, except I get a
> number of C++ related linking errors.

> My command line is:

> g++ -Wl,--enable-auto-import -ftemplate-depth-99 -O2 -o uml.exe
[...]
> After a number of auto-import warnings, which I expect, like:
> Warning: resolving QString::shared_null   by linking to
> __imp___7QString$shared_null (auto-import)

> I receive a series of messages, which I don't expect, like:
> umlview.o(.text+0x34f5):umlview.cpp: undefined reference to `cerr'
> umlview.o(.text+0x34fa):umlview.cpp: undefined reference to
> `ostream::_ls(char const *)'
> umlview.o(.text+0x3506):umlview.cpp: undefined reference to `endl(ostream &)
> '

> Any ideas?

cerr et al. are in libstdc++.a

Add libstdc++.a to the link line.  Libtool uses gcc to link not g++,
i guess it is a bug in libtool, though if you use g++ like shown above
libstdc++ should be linked in automatically.

Gerrit
-- 
=^..^=                                        mailto:gp AT familiehaase DOT de


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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