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 (again)



Hi Tord,

On Nov 24, 2007, at 8:22 AM, Tord Romstad wrote:

On Nov 24, 2007 1:53 PM, Finlay Dobbie <email@hidden> wrote:
On Nov 24, 2007 12:45 PM, Tord Romstad <email@hidden> wrote:
My problem is that I use the Intel C++ compiler (version 10.1), which
doesn't seem to support the -mmacosx-version-min=10.4 switch. The
program compiles without errors when I try using this switch, but the
UNIX2003 symbols still appear in the binary. How do I compile a Tiger
compatible binary with the Intel compiler?

Have you tried asking Intel?

Yes, sort of. Yesterday, I started a thread about it on Intel's C++ compiler forum, which I assume is read by Intel employees as well as users of the compiler. So far, there has not been any replies.

Here's my guess based on what -mmacosx-version-min does.

For the compiler:
-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1040

The /usr/include/AvailabilityMacros.h will then take care of turning that into MAC_OS_X_VERSION_MIN_REQUIRED.

For the linker, if using the underlying ld or if using Intel's compiler driver and it uses the underlying LD:
If linking an executable tell the linker not to add the default CRT startup and instead add the pre-10.5 compatible crt1.o to the end of the files list. This will make it link with the old crt1.o instead of the new Leopard-only crt1.10.5.o.


There are similar steps if you're doing a dylib or bundle (they have their own .o files equivalent to crt1.o).

-Dave

_______________________________________________
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 (again) (From: "Tord Romstad" <email@hidden>)
 >Re: Compile in Leopard, use in Tiger (again) (From: "Finlay Dobbie" <email@hidden>)
 >Re: Compile in Leopard, use in Tiger (again) (From: "Tord Romstad" <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.