[Solved] How to set deployment target on Mac?
Hi, I'm using in my app NSSharingServicePicker, that is part of the new sharing API in Mountain Lion and I cannot build my app to make it work on Snow Leopard. The app is working fine in ML but when it's executed in SL it automatically crashes when launched with this error:
@Dyld Error Message:
Symbol not found: OBJC_CLASS$_NSSharingServicePicker
Referenced from: /Volumes/:Users:sheenmue:QT:Horus-build-desktop-Qt_4_8_4__Qt__Release:Horus/Horus.app/Contents/MacOS/@
NSSharingServicePicker is really never used because I control in code that it's only called if system version is >=10.8 and that part of the code isn't even accessed after the user presses a button, but it detects that it's used in some part of the code and it crashes.
It seems that this problem (using API calls that are not available in older versions) can be solved in XCode setting the base SDK as 10.8 and deployment target as 10.6 but I don't know how to set the deployment target in Qt and Qt Creator, so how could I do it?
I could finally discover how to set deployment target on OS X. I added this in .pro file:
@QMAKE_CFLAGS += -mmacosx-version-min=10.6
QMAKE_CXXFLAGS += -mmacosx-version-min=10.6@
I haven't really tested this on Snow Leopard because I upgraded the partition where I had SL to Lion to check something, but the app was crashing with the same error message in Lion so I think it should work fine in SL too.
Nice, thanks for sharing !
Can you also update the title of the thread to solved ? So other users interested in this topic will know that you found the solution.
Sure, title modified.