www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/08/11:03:23

Reply-To: <arfa AT clara DOT net>
From: "Arthur" <arfa AT clara DOT net>
To: "DJGPP Mailing List" <djgpp AT delorie DOT com>,
"David FitzGerald" <dfitz AT indigo DOT ie>
Subject: RE: Can't get c++ part of djgpp to work!
Date: Sat, 8 Aug 1998 16:01:24 +0100
Message-ID: <000201bdc2dd$68fcc980$bb4d08c3@arthur>
MIME-Version: 1.0
Importance: Normal
In-Reply-To: <000701bdc2d8$80e41e40$51867dc2@indigo.ie>

> I'm having trouble compiling and linking this c++ program with djgpp under 
> windows 98...
> I'm not really used to using windows/dos machines, but I'm familiar with 
> gcc under UNIX.
> 
> Stuff written in c seems to be fine, but c++ seems not to work
> 
> ---------------------------
> #include <iostream.h>
> 
> int main()
> {
>  cout << "Hello World";
>  return(0);
> }
> 
> 
> 
> the error message is as follows
> 
> C:\WINDOWS>cd ..\djgpp
> 
> C:\djgpp>gcc -c dpf.cc
> 
> C:\djgpp>gcc -o dpf.exe dpf.o
> dpf.o(.text+0xc):dpf.cc: undefined reference to `endl(ostream &)'
> dpf.o(.text+0x16):dpf.cc: undefined reference to `cout'
> dpf.o(.text+0x1b):dpf.cc: undefined reference to `ostream::operator<<(char const
>  *)'
> dpf.o(.text+0x26):dpf.cc: undefined reference to `ostream::operator<<(ostream &(
> *)(ostream &))'
> 
> -------------

Put SET LFN=Y in your autoexec.bat file, and compile with gxx rather than gcc.

James Arthur
jaa AT arfa DOT clara DOT net
ICQ#15054819 

- Raw text -


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