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: Compile in Leopard, use in Tiger



Hi Panayotis,

It's in the fine-print of the release notes but the bottom-line is that the new developer tools set the "minimum version" to the currently running system. Prior to Leopard's GCC, the compiler used 10.1 when compiling ppc code and 10.4 when compiling x86 code.

I suspect the reason for this change is the UNIX compliance. Unless you target 10.5 as the minimum OS X version, your code will not be UNIX compliant. Since code compiled with default compiler parameters must be UNIX compliant in order for the system to be considered UNIX compliant the compiler must use 10.5 as the default minimum OS X version.

If you don't care about UNIX compliance and want the library to work on prior OS X versions the fix is to add -mmacosx-version-min=10.4 to your compiler flags.

-Dave


On Nov 23, 2007, at 8:59 AM, Panayotis Katsaloulis wrote:

Hello

I was trying to compile a program (a library actually) in my new shiny
Leopard, and then try to use it in Tiger.
Everything was OK, apart from the fact that the name of some functions
in the frameworks have changed.

To be more precise, I found that some symbols were missing, and especially
_close$UNIX2003
_fputs$UNIX2003
_fwrite$UNIX2003
_mktime$UNIX2003
_open$UNIX2003
_read$UNIX2003
_strtod$UNIX2003
_write$UNIX2003


By searching this archive I found this post by Greg Parker:
http://lists.apple.com/archives/Darwin-dev/2007/Nov/msg00061.html

which is informative but doesn't really state which are these special
parameters, or what should I put in the #include directive, so that
the linker will try to link to "_close"  function instead of
"_close$UNIX2003"

Any help with this?

--
Panayotis
_______________________________________________
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

_______________________________________________ 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: 
 >Compile in Leopard, use in Tiger (From: "Panayotis Katsaloulis" <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.