开发者

How to build a PyObjC project on Mac OS X 10.6, that runs 10.5?

I have a PyObjC project that I build on Mac OS X 10.6 with XCode 3.2 and I'm not able to run on 10.5.

All I'm using is the official PyObjC project templates to create an empty project (that simply opens a window). Then I build the app and copy it over to 10.5. But the app always crashe开发者_JAVA百科s on 10.5:

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: '/Users/hupf/Development/PyHelloWorld/main.m:44 main() PyRun_SimpleFile failed
with file '/Users/hupf/Desktop/PyHelloWorld.app/Contents/Resources/main.py'.  See
console for errors.'

What can I do to make it run on 10.5 too? Why is there still this path /Users/hupf/Development/ I only have on my 10.6 machine?

Greetings, hupf

P.S. I've also installed Python through MacPorts on my 10.6 machine... might this be a problem?


I don't know anything about PyObjC but your project is using Xcode then you just need to set your project's deployment target to the oldest OS version you want your app to run on. (FYI: The SDK version defines the newest version of the OS you app will run on.) Note also that any API's added after the deployment target version will be weak-linked meaning that if you're running on the older OS where those API's don't exist they will be nil; if you call them you will crash. (so you should always check them for != nil before calling them).

Again, this isn't necessarily an PyObjC answer; YMMV…

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜