Reply-To: From: "Arthur" To: "DJGPP Mailing List" , "David FitzGerald" 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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Importance: Normal In-Reply-To: <000701bdc2d8$80e41e40$51867dc2@indigo.ie> Precedence: bulk > 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 > > 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