From: David Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Compile and link C++ program Date: Thu, 06 Nov 1997 17:39:59 +0800 Organization: iiNet Technologies Lines: 24 Message-ID: <3461906E.E86BAD90@cs.curtin.edu.au> References: <63qn2c$e86$1 AT news DOT kth DOT se> NNTP-Posting-Host: reggae-05-49.nv.iinet.net.au Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk are u using a .cc extension? or a .c! Björn Landsberg wrote: > Hi, > Im just trying to get started with djgpp. > But I get error messages when I try to compile a simple hello world c++ > program. That is when i've included iostream.h and try to use: > cout << "bla bla..."; > > I get the message "undefined reference to cout". > If I use the -c option when I call gcc, wich skips the linking, I get no > errors. I also tried -O wich I read somewhere. > > Whats wrong? Ive read the helpfiles and desperatley tried various > combinations of different command-line arguments, without success. > > Bjorn. > > bjorn DOT riikka AT usa DOT net > Thank You!