delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/08/10:42:17

From: "David May" <dmay AT tvi DOT cc DOT nm DOT us>
Organization: Albuquerque T-VI
To: "George Xu" <gxu AT earthlink DOT net>
Date: Wed, 8 Jan 1997 08:17:23 -0700
Subject: Re: djgpp doesn't compile right
CC: djgpp AT delorie DOT com
Message-ID: <7109267ACE@tvi_mail.tvi.cc.nm.us>

> Hi, 
> 
> The Djgpp compiler works  for c programs, but doesn't seem to work
> with c++ programs. I downloaded and installed all the files which are said
> to 
> be necessary to compile c++ programs. 
> 
> The following is a gcc.log I got, if you have the compiler worked, please
> help.
> Thanks in advance, 
> 
> c:/djgpp/tmp\ccdaaaaa(.text+0x1a):ex1.cc: undefined referenced to
> 'endl(ostream &)'
> c:/djgpp/tmp\ccdaaaaa(.text+0x24):ex1.cc: undefined referenced to 'cout'
> c:/djgpp/tmp\ccdaaaaa(.text+0x29):ex1.cc: undefined referenced to
> 'ostream::operator<<(char const *) '
> 
> george
> gxu AT earthlink DOT net
> :-)

Try
   gxx -o ex1.exe ex1.cc

or, using gcc, tack on a "-liostr".  gcc  needs to tell the 
linker to link in the C++ streams library.  gxx does this 
automatically.

Regards.
David May, ID Card Administrator
Albuquerque TVI

- Raw text -


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