From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11983 invoked by alias); 2 Mar 2004 13:24:14 -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 Mail-Followup-To: cygwin@cygwin.com Received: (qmail 11975 invoked from network); 2 Mar 2004 13:24:13 -0000 Received: from unknown (HELO koeln.convey.de) (62.138.63.18) by sources.redhat.com with SMTP; 2 Mar 2004 13:24:13 -0000 Received: from ismene.koeln.convey.de (192.168.5.3:1530) by koeln.convey.de with [XMail 1.17 (Win32/Ix86) ESMTP Server] id for from ; Tue, 2 Mar 2004 14:24:11 +0100 Date: Tue, 02 Mar 2004 14:56:00 -0000 From: "Gerrit P. Haase" Reply-To: "Gerrit P. Haase" Organization: Esse keine toten Tiere Message-ID: <1591625311494.20040302142332@familiehaase.de> To: Lauer Rainer CC: "'cygwin@cygwin.com'" , "'lauerr@gmx.net'" Subject: Re: gcc problem In-Reply-To: <0FFE4E4AF139D311A62C00508B0BE5E801EB9F09@exchange3.villingen.thmulti.com> References: <0FFE4E4AF139D311A62C00508B0BE5E801EB9F09@exchange3.villingen.thmulti.com> MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit X-SW-Source: 2004-03/txt/msg00109.txt.bz2 Hello Rainer, you wrote: > I've installed the latest version of cygwin (as of today 2.03.04). My PC is > running Windows 2000 with service pack 4. Installation is done on my loca > drive d:. I tried a small "C++" and failed, the reason is totally unclear to > me. > The program is: [...] > The error message is: > $ gcc -o gtest gtest.cc > /cygdrive/c/DOCUME~1/lauerr/LOCALS~1/Temp/ccCmpxzX.o(.text+0x4d):gtest.cc: > undefined reference to `std::ios_base::Init::Init[in-charge]()' > /cygdrive/c/DOCUME~1/lauerr/LOCALS~1/Temp/ccCmpxzX.o(.text+0x68):gtest.cc: > undefined reference to `std::ios_base::Init::~Init [in-charge]()' > collect2: ld returned 1 exit status g++ is in a separate package named gcc-g++, be sure you have installed this too. Then you need to link against libstdc++ when using gcc as driver: gcc -o gtest gtest.cc -lstdc++ or you use g++ as driver which includes libstdc++ automatically: g++ -o gtest gtest.cc HTH, Gerrit -- =^..^= http://nyckelpiga.de/donate.html -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/