delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/11/14:01:18

From: Thomas Larsson <thomas DOT larsson AT mbox5 DOT swipnet DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Trouble with C++ and interrupt
Date: Thu, 11 Dec 1997 19:49:02 +0100
Organization: A customer of Tele2
Lines: 31
Message-ID: <3490359E.3883@mbox5.swipnet.se>
NNTP-Posting-Host: mn8.swip.net
Mime-Version: 1.0
Cache-Post-Path: mn8!s-2455 AT dialup80-2-46 DOT swipnet DOT se
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi

I have some problems when I try to compile C++ programs.

I just tried to compile the following file:
test.cpp:
#include <iostream.h>

void main(void)
{
	cout << "HI!";
}

I wrote "gcc test.cpp -o test.exe"
I got two strange error messages:
c:/djgpp/tmp\ccdaaaaa(.text+0x12):test.cc: undefined reference to 'cout'
c:/djgpp/tmp\ccdaaaaa(.text+0x17):test.cc: undefined reference to
'ostream::operator(((char const*)'

What could be wrong?
(I've tried to compile the examples in the help files but they don't
work either. I can compile C programs without problems)

I have also tried to compile some examples for multiple keypresses. They
all include a keyword called "interrupt" but DJGPP doesn't find it
anywhere. Should I replace it or should I use another keyword?

Thanks for your help, I have looked through the FAQ but I can't find any
answers to the problems there...

Regards Thomas

- Raw text -


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