如何将在64位Mac OSX上开发的mac osx应用编译为在32位上运行? [英] How do I compile mac osx app developed on 64 bit Mac OSX to run on 32 bit?
问题描述
我正在用Objective C/C ++在mac osx美洲狮10.8中编写一个程序.机器是64位的. 我是Mac新手,来自Windows .Net开发和C/C ++
I am writing a program in mac osx mountain lion 10.8 in Objective C/C++ . The machine is 64 bit. I am new to mac world coming from windows .Net development and C/C++
目标: 该程序必须与平台10.5 mac osx Leopard兼容,并且从32bit/64bit开始兼容. 目标是为10.5-10.8 32bit/64bit提供单一安装程序/发行版
GOAL: The program has to be compatible with platoform 10.5 mac osx Leopard and onwards both 32bit/64bit. And the goal is to have single installer/release for 10.5 - 10.8 32bit/64bit
我的理解是(可能是我错了,请纠正我),如果我在10.8 Lion 64位上进行编译,则该程序将不会在10.5 32位版本上运行,但可能会在10.5 64位上运行(当然,我必须对其进行测试.
My understanding is (May be I am wrong , please correct me) that If I compile it on 10.8 Lion 64 bit the program will not run on for example on a 10.5 32-bit versions but may run on 10.5 64 bit (ofcourse I have to test it).
考虑到我的平台10.8 64位,我可以使xcode编译32bit/64bit的应用程序并发布一个版本而不是两个版本吗?
Given my platform 10.8 64 bit can I make xcode compile the app for 32bit/64bit and have one release rather than two variations ?
在linux/windows上,如果我编译32位程序,它也将在64位平台上运行,但是相反,我不确定xcode/mac如何实现我的目的.
On linux/windows if I compile a 32bit program it will run on 64 bit platforms too, but not the other way around I am not sure how xcode/mac can achieve my purpose.
推荐答案
将基本SDK设置为Mac的当前版本(例如10.7) 将Deployment SDK设置为旧版本(例如1.4版)
Set the Base SDK to Current version of Mac (ex. 10.7) Set the Deployment SDK to older version (ex.1.4)
将部署目标更改为:
Change Deployment target as :
将基本SDK更改为:
Change Base SDK as:
在此之上,您将找到体系结构,可以根据需要将其更改为32或64
Just above this you will find architectures, you can change them to 32 or 64 as your need
这篇关于如何将在64位Mac OSX上开发的mac osx应用编译为在32位上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!