Mail Archives: djgpp/2002/01/22/02:20:12
> From: RazorSliph <sliph AT gmx DOT net>
> Newsgroups: comp.os.msdos.djgpp
> Date: Mon, 21 Jan 2002 15:57:26 -0500
>
> Greetings! I need to compile an application using the -fpack-struct so
> that the structures generated (and written to disk) are identical to
> the saved structures created by another program. The structures,
> unfortunately, are 10 bytes wide, and get padded to 12 bytes with a
> base compile.
See section 22.11 of the DJGPP FAQ list, it explains the issues
involved and suggests several possible solutions.
> However, whenever I compile with the -fpack-struct option, the
> resulting executable segfaults. (GPF's)
That's expected, since you include headers which define structures
used by C++ library functions, and those library functions were not
compiled with -fpack-struct. So you introduced an incompatibility
between the library and your program. This is also exlpained in the
FAQ.
In general, I find -fpack-struct to have too many limitations to be
of practical use for what you want to do. Use one of the other
methods described in the FAQ.
- Raw text -