delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/12/10/17:17:55

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: "jansb000" <jansb000 AT wxs DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Linking problem with GCC 3.0.2
Date: Mon, 10 Dec 2001 23:03:18 +0100
Organization: Planet Internet
Lines: 25
Message-ID: <9v3b7b$r9q$1@reader08.wxs.nl>
NNTP-Posting-Host: ipc3797b13.dial.wxs.nl
X-Trace: reader08.wxs.nl 1008021547 27962 195.121.123.19 (10 Dec 2001 21:59:07 GMT)
X-Complaints-To: abuse AT planet DOT nl
NNTP-Posting-Date: 10 Dec 2001 21:59:07 GMT
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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?



- Raw text -


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