www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/02/04/15:40:53

From: Martin DOT Stromberg AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: funny for and while loop and c++ problems
Date: 4 Feb 1999 20:20:15 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 41
Message-ID: <79cvdv$3bt$2@antares.lu.erisoft.se>
References: <36B9D646 DOT DFD01E97 AT hotmail DOT com>
NNTP-Posting-Host: juno.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

pcgamesmaster AT hotmail DOT com (pcgamesmaster AT hotmail DOT com) wrote:
: question 1:

was already answered.

: while i attempt to compile c++ code in djgpp using the command-line

: gcc <filename.cpp>

: djgpp returns me with

: ========================================================================
: c:/djgpp/tmp\ccdaaaaa(.text+0x1a):testcpp.cc: undefined reference to
: `endl(ostream &)'
: c:/djgpp/tmp\ccdaaaaa(.text+0x24):testcpp.cc: undefined reference to
: `cout'
: c:/djgpp/tmp\ccdaaaaa(.text+0x29):testcpp.cc: undefined reference to
: `ostream::operator<<(char const *)'
: c:/djgpp/tmp\ccdaaaaa(.text+0x34):testcpp.cc: undefined reference to
: `ostream::operator<<(ostream &(*)(ostream &))'
: ========================================================================

: this is the program listing :

: ========================================================================
: #include <iostream.h>

: main() {
:     cout << "Hello World!" << endl;
: }
: ========================================================================

: how do i compile c++ code in djgpp?


Try "g++ <filename.cpp>" or "gxx <filename.cpp>".


Right,

							MartinS

- Raw text -


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