X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Tue, 22 Jan 2002 09:19:05 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: RazorSliph Message-Id: <3405-Tue22Jan2002091904+0200-eliz@is.elta.co.il> X-Mailer: emacs 21.2.50 (via feedmail 8 I) and Blat ver 1.8.9 CC: djgpp AT delorie DOT com In-reply-to: <6kvo4ukaf4ceud3gn6pp0ut7t08jsup0kv@4ax.com> (message from RazorSliph on Mon, 21 Jan 2002 15:57:26 -0500) Subject: Re: -fpack-struct issues References: <6kvo4ukaf4ceud3gn6pp0ut7t08jsup0kv AT 4ax DOT com> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > From: RazorSliph > 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.