本文介绍了如何编译Mac OS X 10.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编译我的10.5版本的应用程序并转发。自升级到Snow Leopard并安装最新的XCode以来,gcc默认为10.6。我试过 -isysroot /Developer/SDKs/MacOSX10.5.sdk ,但这似乎不起作用。是否有GCC标志允许我设置SDK?




谢谢,
Rui


对于gcc,您需要设置 -mmacosx -version-min = 10.5


I'd like to compile my application for version 10.5 and forward. Ever since I upgraded to Snow Leopard and installed the latest XCode, gcc defaults to 10.6. I've tried -isysroot /Developer/SDKs/MacOSX10.5.sdk but that doesn't seem to work. Is there a GCC flag that allows me to set the SDK?

(Incidentally, I changed the gcc symbolic link to point to gcc-4.0 instead of gcc-4.2 and it worked but I thought I could tell the latest GCC to compile for an older SDK).

Thanks,Rui

解决方案

In XCode you only need to set the deployment target to OSX 10.5.
For gcc you need to set -mmacosx-version-min=10.5.

这篇关于如何编译Mac OS X 10.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-02 06:50