Re: alignment issue - Codewarrior vs XCode
Re: alignment issue - Codewarrior vs XCode
- Subject: Re: alignment issue - Codewarrior vs XCode
- From: Gen Kiyooka <email@hidden>
- Date: Tue, 12 Jul 2005 09:46:50 -0700
Working backwards from system-structures like the QuickTime and
QuickDraw structs,
it clearly is possible to build structures that have identical in-
memory representations
with both compilers. My suggestion is to copy the QuickTime header
syntax for
CodeWarrior/XCode.
Gen
On Jul 12, 2005, at 9:04 AM, Alan Dail wrote:
I'm doing some work on an app that has been broken into two apps.
App one writes files to disk, app two reads those files in from
disk and does some batch processing. App 1 is written with MacApp
and uses Codewarrior. App 2 is the one I'm working on and is a
cocoa app. I've been working on moving the cocoa app from
codewarrior to XCode as step 1 of migrating to support the future
Intel macs and I've run into an issue.
The first part of the file is a header that is created by simply
block writing a struct to disk. Not the best approach for sure,
but that's what I have to work with at this point. The struct has
a bunch of shorts/long/bool/etc. The problem I'm running into is
the struct is a different length in XCode as it is in codewarror.
And setting pragma align statements to adjust it not only isn't
helping, but is actually giving me different results on the
different compilers.
I've tried
#pragma align=power
#pragma align=mac68k
each followed by
#pragma align=reset
at the end of the structure definitions and get different size
structs. Clearly the code to read and write the file will
eventually have to be rewritten to handle endian issues, but for
now at least, I'd like to find a way to get the same size struct on
both compilers. Is there something I'm perhaps overlooking?
Alan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden