Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / July 2006



Tip: Looking for answers? Try searching our database.

Going universal binary goes haywire

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RogueWarrior - 25 Jul 2006 23:36 GMT
Okay, I'm baffled by this one.  I've got a project that compiles,
links, and runs just fine built in XCode and running on a Powerbook G4.
I make a new target for i386, compile it and link it.  As soon as I
launch it or try to debug it I get the following message "Sorry, a
system error occurred at startup. This application will not be able to
run."  That's it...no debugger stuff, nada.  Any idea what might be
wrong?
Patrick Machielse - 25 Jul 2006 23:59 GMT
> Okay, I'm baffled by this one.  I've got a project that compiles,
> links, and runs just fine built in XCode and running on a Powerbook G4.
[quoted text clipped - 3 lines]
> run."  That's it...no debugger stuff, nada.  Any idea what might be
> wrong?

Probably something you forgot to include in the new target, or a wrong
setting. Why do you create a new target at all, why not simply 'check
the checkbox'?

patrick
RogueWarrior - 26 Jul 2006 02:46 GMT
*sigh* and so the nightmare of updating old code begins.

Turns out the app was dying because of a failed call to Gestalt.  Why
did it fail?  Because it was trying to get the Gestalt of selector
'vsys'.   Doesn't exist.  Actually it's 'sysv'.  So I've run aground on
the first of what's likely to be hundreds if not thousands of endian
problems.

Gah!  Apple handled Rosetta so nicely, why couldn't they make endian
issues transparent too?
Michael Ash - 26 Jul 2006 04:04 GMT
> Gah!  Apple handled Rosetta so nicely, why couldn't they make endian
> issues transparent too?

Because this would require either continuing on with a big-endian
processor or requiring everyone to use a high-level language which doesn't
expose the endianness of the CPU to the end user. Merits of the CPU switch
are debatable, but requiring you to switch to a completely different
language should obviously be even worse than making you clean up your
code. Endian-unclean isn't something you can just fix in any C-derived
language.

Signature

Michael Ash
Rogue Amoeba Software

Tom Harrington - 26 Jul 2006 04:44 GMT
> *sigh* and so the nightmare of updating old code begins.
>
[quoted text clipped - 6 lines]
> Gah!  Apple handled Rosetta so nicely, why couldn't they make endian
> issues transparent too?

I'm not sure why you're having that problem.  I've got code that calls
Gestalt() on both PPC and Intel and I haven't run into this.  I haven't
tried 'sysv', but 'mclk' and 'ramm' seem to work without any trouble.

Signature

Tom "Tom" Harrington
Macaroni, Automated System Maintenance for Mac OS X.
Version 2.0:  Delocalize, Repair Permissions, lots more.
See http://www.atomicbird.com/

Patrick Machielse - 26 Jul 2006 10:26 GMT
> *sigh* and so the nightmare of updating old code begins.
>
[quoted text clipped - 3 lines]
> the first of what's likely to be hundreds if not thousands of endian
> problems.

So you're not checking the Gestalt() return value, and using invalid
data. Your bad, don't blame Apple. Code defensively...

patrick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.