Re: Compile in Leopard, use in Tiger (again)
Re: Compile in Leopard, use in Tiger (again)
- Subject: Re: Compile in Leopard, use in Tiger (again)
- From: David Elliott <email@hidden>
- Date: Sat, 24 Nov 2007 12:53:22 -0500
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:
This email sent to email@hidden