delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/11/02:38:19

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Tue, 11 Dec 2001 09:16:03 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
X-Sender: pavenis AT ieva06
To: jansb000 <jansb000 AT wxs DOT nl>
Cc: djgpp AT delorie DOT com
Subject: Re: Linking problem with GCC 3.0.2
In-Reply-To: <9v3b7b$r9q$1@reader08.wxs.nl>
Message-ID: <Pine.A41.4.05.10112110914290.90628-100000@ieva06>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Mon, 10 Dec 2001, jansb000 wrote:

> I have created this program:
> 
> #include <iostream>
> using namespace std;
> int main() {
>    cout << "hello" << endl;
> }
> 
> When I compile this (with RHIDE) I get this:
> 
> Compiling: test.cpp
> no errors
> Creating: test.exe
> Error: test.o: In function `main':
> test.cpp(7) Error: undefined reference to `std::cout'
> 
> This is followed by a long list of other errors about undefined std::xxxx
> functions.
> 
> If I type a command-line: "gcc -o test.exe test.cpp -lstdcxx" I get the same
> result.
> What am I doing wrong?
> 

You may have old libstdcxx.a (from previous version of GCC) in lib
directory. Please remove it (or move out of way...). 

Andris




- Raw text -


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