cross-gcc build for a linux host for the msdosdjgpp target problem
Thu Nov 7 14:08:00 GMT 2002
Thank you for the reply. Unfortunately, I am still having issues, although
I think I may be getting closer. Hopefully this is something you can help
After I made the links from the build dir I was able to build libstdc++-v3
without those ctype_base.h errors. When I tried to compile using
i686-pc-msdosdjgpp-g++ I could not because the linker was looking for
libstdcxx.a and all that was there was libstdc++.a. So I made a link from
libstdc++.a to libstdcxx.a to satisfy the linker. I am not sure I should
have had to do this... Why is the linker looking for cxx and not c++ ?
Then when I tried to compile using the cross compiler,
i686-pc-msdosdjgpp-g++, the same errors popped up regarding the ctype_base.h
that were coming up before during making libstdc++-v3.
../include/c++/3.2/bits/ctype_base.h:46: _U' was not declared in this scope
snipped... lots of similar 'undeclared' errors re ctype_base.h
I then realized that even though the links were correctly made, the contents
of the directory include/c++/3.2/bits for some reason had the files from the
srcdir's libstdc++-v3/config/os/newlib instead of
libstdc++-v3/config/os/djgpp. So I moved the newlib dir to a backup
location and then made a copy of config/os/djgpp to config/os/newlib so that
way the build would be forced to see the djgpp headers.
libstdc++-v3 built and installed with no errors. I was able to then compile
a binary using i686-pc-msdosdjgpp-g++ without error, but when I try to
execute the binary under win98 or win2kpro, i get this:
Exiting due to signal SIGSEGV
General Protection Fault at eip=0001a11f
eax=00000000 ebx=0003eb58 ecx=0003eb58 edx=007cffa0 esi=00000054
ebp=007cff68 esp=007cff64 program=H:\ROOT\PROJECTS\CPP\TEST\WELCOME.EXE
cs: sel=01a7 base=01670000 limit=007dffff
ds: sel=01af base=01670000 limit=007dffff
es: sel=01af base=01670000 limit=007dffff
fs: sel=017f base=00005870 limit=0000ffff
gs: sel=01bf base=00000000 limit=0010ffff
ss: sel=01af base=01670000 limit=007dffff
App stack: [007d0000..00750000] Exceptn stack: [00042c88..00040d48]
Call frame traceback EIPs:
Here is the C++ program:
using namespace std;
cout << "Hello world !!!" << endl;
Note: the binary file size for this simple cpp program is 1,847,862 bytes.
Aside from not even executing properly, does this file size seem right?
When I compile a standard C equivalent program using i686-pc-msdosdjgpp-gcc,
I get an exe size of 137,204 bytes and the file executes properly.
Any ideas what is happening here?
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to email@example.com
More information about the crossgcc