Re: application support x86_64 architecture issue
Re: application support x86_64 architecture issue
- Subject: Re: application support x86_64 architecture issue
- From: "Clark Cox" <email@hidden>
- Date: Tue, 21 Oct 2008 07:23:18 -0700
On Tue, Oct 21, 2008 at 2:02 AM, XiaoGang Li <email@hidden> wrote:
> Hi, List,
> I have an application which need spport both 32-bit and 64-bit mode,
> this is ready for later new OS version. and my application also can run on
> 10.3.9 and later version. So, I set the build setting 'Architectures' to the
> value 'i386 ppc x86_64', and keep the Base SDK Path is
> '$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk',
In order to build 64-bit GUI applications, you must use the 10.5 (or later) SDK.
> then build fail.
> The build result said that 'syntax error before '*' token' in the head file
> DriverServices.h. If I change the Base SDK to MacOSX10.5.sdk, build success.
> But, the application can not run in Mac OS X 10.4 verison.
> So, can anyone tell me the relationship about the Architecture-Base
> SDK- and the Mac OS version.
> Build environment: OS 10.5.5, Xcode 3.0
> and other gcc setting is default.
> Thanks very much.
> Andrew
The solution to your problem is to use different base SDKs for
different architectures. Assuming that you're running Xcode 3.1 or
later:
1) Open your target's build settings, and select the setting for "Base SDK".
2) Set the "Base SDK" to Mac OS X 10.5
3) From the popup button (with the gear icon) at the bottom of the
window, choose "Add Build Setting Condition".
4) A new line should appear below "Base SDK", with two popups. Set the
left one to "Intel", and the right one to "Mac OS X 10.4"
5) Repeat steps 3 and 4, but this time, choose "PowerPC" for the left popup.
Another way to accomplish this is to simply copy the next three lines
from this e-mail:
SDKROOT = macosx10.5
SDKROOT[arch=i386] = macosx10.4
SDKROOT[arch=ppc] = macosx10.4
and paste them into the build settings table. Using either method
results in the same end result: a target that builds the 64-bit parts
of itself against the 10.5 SDK, and builds the 32-bit parts against
the 10.4 SDK.
--
Clark S. Cox III
email@hidden
_______________________________________________
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