From: ams AT ludd DOT luth DOT se (Martin Str|mberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: My first steps Date: 30 Aug 1998 14:36:23 GMT Organization: University of Lulea, Sweden Lines: 28 Message-ID: <6sbo17$k22$3@news.luth.se> References: <6-mRyROCZFB AT jerakeen DOT online-club DOT de> NNTP-Posting-Host: queeg.ludd.luth.se To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 : 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