From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24055 invoked by alias); 4 Jan 2002 17:51:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Received: (qmail 24028 invoked from network); 4 Jan 2002 17:51:22 -0000 Received: from unknown (HELO mail.butlermfg.com) (12.13.78.28) by sources.redhat.com with SMTP; 4 Jan 2002 17:51:22 -0000 Received: from nttwr2.tower.bldgs.butlermfg.org ([172.16.1.20]) by mail.butlermfg.com with Microsoft SMTPSVC(5.5.1877.197.19); Fri, 4 Jan 2002 11:38:11 -0600 Received: by nttwr2.tower.bldgs.butlermfg.org with Internet Mail Service (5.5.2653.19) id ; Fri, 4 Jan 2002 11:51:46 -0600 Message-ID: From: "Parker, Ron" To: "Gerrit P. Haase @ cygwin" Subject: RE: C++ Link Errors Date: Fri, 04 Jan 2002 09:51:00 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-SW-Source: 2002-01/txt/msg00167.txt.bz2 > > 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. The libtool I have does use g++ and it is being linked with libstdc++.a. I even added a spare -lstdc++ to the end of the g++ command, but the error remains. It may be worth mentioning that the error is seen during the collect2 phase. -- 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/