Mail Archives: djgpp/1998/08/10/18:17:30
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 <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 &))'
--
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à...
- Raw text -