Re: Compile in Leopard, use in Tiger
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Hi Panayotis, -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. 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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/dfe%40tgwbd.org _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... 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. 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 This email sent to dfe@tgwbd.org This email sent to site_archiver@lists.apple.com
participants (1)
-
David Elliott