Re: Porting windows app to OS X and it's extremely huge as a result
Re: Porting windows app to OS X and it's extremely huge as a result
- Subject: Re: Porting windows app to OS X and it's extremely huge as a result
- From: Ken Thomases <email@hidden>
- Date: Sat, 24 May 2008 22:33:05 -0500
On May 24, 2008, at 5:04 PM, Platon Fomichev wrote:
Thanks for your help. Indeed I am using latest Tiger XCode with GCC
4.0.1 (gcc version 4.0.1 (Apple Computer, Inc. build 5370)) on OS X
10.4.11. I will try rebuilding stuff on Leopard and hopefully it
will work backwards on Tiger (I see no reasons why it should not).
You will need to specify "-isysroot /Developer/SDKs/MacOSX10.4u.sdk -
mmacosx-version-min=10.4" to all invocations of gcc/g++. If you
invoke ld directly (rather than using gcc/g++ as a front-end to the
linker), you'll need to supply "-syslibroot /Developer/SDKs/
MacOSX10.4u.sdk -macosx_version_min 10.4".
Setting the SDK makes sure your code doesn't make use of Leopard-only
API. Setting the minimum deployment version makes sure the compiler
and linker only use features of the Mach-O object file format which
are compatible with the specified deployment target.
Apple refers to building on one OS version while targeting deployment
on a different OS version as "cross-development": http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development/
Also, see these links for some related details:
http://developer.apple.com/releasenotes/Darwin/SymbolVariantsRelNotes/
http://developer.apple.com/releasenotes/Darwin/RN-Unix03Conformance/
Cheers,
Ken
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden