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 X-Sender: pavenis AT ieva06 To: jansb000 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk On Mon, 10 Dec 2001, jansb000 wrote: > I have created this program: > > #include > 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