Mail Archives: djgpp/1998/08/30/10:45:48
Holger Merk (Jerakeen AT ONLINE-CLUB DOT de) wrote:
: I've just downloaded DJGPP V2 and installed it on my OS/2-System. But
: I'm quite new to C++ and have some problems with compiling the following
: program, which works fine with IBM C-Set:
:
: #include <iostream.h>
: int main(void) {
: cout << "Hello World";
: }
:
: When compiling it with "gcc hello.cpp -o hello.exe -lm" I get the
: following error:
:
: c:/prg/anw/djgpp/tmp\cccanohi(.text+0x15):hello.cpp: undefined
: reference to `cout'
: c:/prg/anw/djgpp/tmp\cccanohi(.text+0x1a):hello.cpp: undefined reference to `ostream::operator<<(char const *)'
:
: If I use "printf" instead of "cout" everything works fine. Is this an DJGPP problem or am I just to stupid to write a simple cpp-program ?
No. You haven't read the readme.1st file in the DJGPP directory. (The
answer is use g++, gxx or gpp to compile C++ programs.)
Do yourself and us a favor and read the FAQ (v2/faq*b.zip).
Holmboe, Symphony No. 6,
MartinS
- Raw text -