From: Flavio Poletti Newsgroups: comp.os.msdos.djgpp Subject: Re: Can't get c++ part of djgpp to work! Date: Mon, 10 Aug 1998 23:33:02 +0200 Organization: TIN Lines: 58 Message-ID: <35CF670E.A90E563B@writeme.com> References: <000701bdc2d8$80e41e40$51867dc2 AT indigo DOT ie> Reply-To: flavpol AT tin DOT it NNTP-Posting-Host: a-rm39-48.tin.it 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 It sounds like you have a mixed LFN _and_ compiler problem. When you compile with gcc a cpp/C/cc file, the compiler will compile it in a C++ fashion, but you have to include all libs in the compiling process. So, gxx will solve your problem, because it will put -lstdcxx for you: gcc -o dpf.exe dpf.cc -lstdcxx == gxx -o dpf.exe dpf.cc or something similar. Then, back to the LFN problem. If you installed your compiler with a long file names capable unzipper, like WinZip, LFN=y should work fine. If you installed it from the DOS prompt with unzip, pkunzip or so on, you'd better put the LFN=n line in your DJGPP.ENV file. Regards, Flavio. David FitzGerald wrote: > 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 &))' -- Flavio Poletti email: poletti AT writeme DOT com La libertà è lì, alla portata di tutti, come la chitarra... ... ognuno suona come vuole, e tutti suonano come vuole la libertà...