Mail Archives: djgpp/1997/08/12/14:34:19
> the exact same code, compiled under Borland TC++ V3.0? Is this normal?
> Is there something i;m doing wrong (most certainly!).
Were you accessing data via structure pointers?? If so note that djgpp
tends to pad data more than some of the older dos compilers,
and the default size of 'int' is 32 bits, not 16. You could try using
__attribute__ ((packed)) to get rid of the padding, and replace ints with
shorts as needed. See the docs on gcc extensions for packing data. It may
also be in the FAQ.
> I still also have the problem that i cannot debug any of my code that i
> have '#include' into modules? Do i have to link all my source files,
> instead of just all my modules?
Putting code in header files is generally a poor idea. I suspsect you have
run into one of the limitations of sdb debugging format.
The easist way to do what you want (shameless plug following) is to get
pgcc from www.goof.com. Its fairly stable right now, with a few quirks
with known workarounds. Just compile your code with -gstabs, and as long
as you use gdb you should be OK. Another option would be
to get Robert's patch to gcc and recompile it yourself.
Andrew
- Raw text -