X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Sun, 30 Dec 2001 05:43:04 +0000 (GMT) From: findleyd AT swbell DOT net Subject: Re: Problem with cross compile from Linux to DOS To: djgpp AT delorie DOT com Message-id: <0GP500MXQ6R3BH@mta4.rcsntx.swbell.net> Reply-To: djgpp AT delorie DOT com > >> /usr/local/i586-pc-msdosdjgpp/bin/ld -o testx >> /usr/local/i586-pc-msdosdjgpp/lib/crt0.o >> -L/usr/local/lib/gcc-lib/i586-pc-msdosdjgpp/2.8.1 >> -L/usr/local/i586-pc-msdosdjgpp/lib test.o -lstdc++ -lm -lgcc -lg -lc -lgcc >> test.o: In function `main': >> test.cpp:2: undefined reference to `endl(ostream &)' > >This certainly looks right. Try running i586-pc-msdosdjgpp-nm on the >libstdc++ it finds. Add -Wl,-Map,test.map to the g++ line to have it >tell you exactly where it found the library (and other goodies). The >two things I'm thinking of are (1) finding the wrong libstdc++.a, or >(2) libstdc++.a missing stuff inside it. Running i586-pc-msdosdjgpp-nm on libstdc++ indicated that it was in the wrong format. When I tried to compile the test program initially, it could not find libstdc++ . I symlinked to the version that is invoked in standard gcc compiles...obviously not the correct move. The question is, why did I not get a DOS version when I built the compiler? I used the instructions from delorie.com for the build. The only variance was that I used djcrx203.zip, rather than 202, which was not available. When I made gcc, I got compile errors in gcc-2.1.8/objc/archive.c and misc.c. In misc.c the error inidcated a conflict of types for whcar_t in stddef.h and stdlib.h. I managed to get it to compile by commenting out the include of stdlib.h in archive.c, and changing the include of stddef.h to stdlib.h. I suspect there is a version incompatibility somewhere. Should I be using diffierent versions of binutils and gcc with djcrx203.zip?