Article View: gnu.gcc.help
Article #41440How to use iostream?
From: Henner Harnisch
Date: Sun, 07 Apr 1996 00:00
Date: Sun, 07 Apr 1996 00:00
30 lines
1392 bytes
1392 bytes
Hello everyone,
maybe I have got a very stupid question, but I just can't get it to work:
I am using DJGPP for MSDOS (under Window95).
The following program:
#include<iostream.h>
int main()
{
cout << "Hello world!" << endl;
return 1;
};
always get the following compiler/linker errors:
programm.cc(.text+0x10) : undefined reference to 'endl(ostream &)'
programm.cc(.text+0x1a) : undefined reference to 'cout'
programm.cc(.text+0x1f) : undefined reference to 'ostream::operator<<(char const *)'
programm.cc(.text+0x2a) : undefined reference to 'ostream::operator<<(ostream &(*)(ostream
&))
I know that I have to link some certain libraries to my program, but which one. I read the
FAQ but I could not find out, how to handle this basic question.
Maybe someone of you has got the time and can leave me a note...
Thanx and sorry for this question
Henner
:-)
Technical Details
Message-ID:
<3167BFE5.42B9@rummelplatz.uni-mannheim.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,ed2efffba628a5d0,start X-Google-Attributes: gid11318c,public From: Henner Harnisch <fbbe@rummelplatz.uni-mannheim.de> Subject: How to use iostream? Date: 1996/04/07 Message-ID: <3167BFE5.42B9@rummelplatz.uni-mannheim.de> X-Deja-AN: 146225741 content-type: text/plain; charset=us-ascii organization: Rechenzentrum Uni Mannheim mime-version: 1.0 newsgroups: gnu.gcc.help x-mailer: Mozilla 2.0 (Win95; I)