Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dlsym(...) and Intel Macs



On 18/7/06 04:35, Eric Albert wrote:
On Jul 17, 2006, at 8:29 PM, Damien Sorresso wrote:

On 17 Jul, 2006, at 10:16 PM, Eric Albert wrote:
On Jul 17, 2006, at 8:08 PM, Damien Sorresso wrote:
No, they're two separate binaries. (Trust me there's a good reason for this.)

I hate to say this, but I don't quite trust you on that. :) What's the reason? I've seen an awful lot of cases over the past year where folks thought they needed separate binaries but I've yet to see one which actually did. Maybe you'll be the first....

Because the application I'm writing has to run on all versions of Panther, down to 10.3.0. (Part of its function is to make sure the user is up-to-date on point releases.) To compile a universal binary, you need to use gcc 4.0, and in order to run applications compiled with gcc 4.0, you must be running 10.3.9.


How's that work for you? :)

Not too well. :) You only need to use gcc 4.0 for the Intel side, but the PowerPC side of your binary can use any Mach-O compiler at all, including gcc 2.95.3 or even CodeWarrior.

In fact, any Mach-O thin file for any operating system and any architecture can be combined in a fat file with any other, I think the only constraint is that the arch should differ. I used that in a demo:


pedagogue:~/devel/nextstep leeg$ file uname-q
uname-q: Mach-O fat file with 4 architectures
uname-q (for architecture i386):        Mach-O executable i386
uname-q (for architecture ppc): Mach-O executable ppc
uname-q (for architecture ppc64):       Mach-O 64-bit executable ppc64
uname-q (for architecture m68k):        Mach-O executable for m68k architecture

there's definitely no way that any gcc 4.x I've ever used can produce Mach-O files for the m68k ;-)
--
Graham Lee
UNIX Systems Manager,
Oxford Physics Practical Course
http://iamleeg.blogspot.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden


This email sent to email@hidden
References: 
 >dlsym(...) and Intel Macs (From: Damien Sorresso <email@hidden>)
 >Re: dlsym(...) and Intel Macs (From: Eric Albert <email@hidden>)
 >Re: dlsym(...) and Intel Macs (From: Damien Sorresso <email@hidden>)
 >Re: dlsym(...) and Intel Macs (From: Eric Albert <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.