www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/02/22/18:58:55

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
To: djgpp AT delorie DOT com
Date: Fri, 22 Feb 2002 17:56:12 -0600
From: "Jason R Kuntz" <cantela AT lycos DOT com>
Message-ID: <FGIDFDNBDJECEBAA@mailcity.com>
Mime-Version: 1.0
X-Sent-Mail: on
X-Mailer: MailCity Service
X-Priority: 3
Subject: can't include iostream.h!
X-Sender-Ip: 216.221.109.87
Organization: Lycos Mail (http://mail.lycos.com:80)
Reply-To: djgpp AT delorie DOT com

I've been using DJGPP with RHIDE for some time now, and I've had a decent degree of luck as far as getting my programs to run, but I've always had one major problem: I can't include iostream.h!  I'm tired of skirting around cout and cin to avoid these errors; it's time to strike at the heart of the beast and figure out what's wrong!  I've checked the FAQ several (hundred) times, however, and can't find anything to remedy this problem.

Here's an example program, and the output from the message window:

#include <iostream.h>

int main()
{
   return 0;
}

(yes, that's it...i can't even try to use cout for a "hello" program!  simply including the file generates linker errors)

Compiling: main.cpp
no errors
Creating: main.exe
Error: main.o: In function `main':
main.cpp(6) Error: undefined reference to `std::ios_base::Init::Init()'
Error: main.cpp(.text+0x5d): undefined reference to `std::ios_base::Init::~Init()'
Error: main.o(.eh_frame+0x11):main.cpp: undefined reference to `__gxx_personality_v0'
Error: collect2: ld returned 1 exit status
There were some errors

I hope I can get some answers. Thanks in advance!



- Raw text -


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