Qt 5 cannot deploy on SnowLeopard

北城以北 提交于 2019-12-03 15:23:11

The NSPreferredScrollerStyleDidChangeNotification notification is only available in OSX 10.7 and later, as noted at the bottom of this page:

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScroller_Class/Reference/Reference.html

Qt will conditionally compile OS X 10.7 APIs if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7. See e.g.:

http://qt.gitorious.org/qt/qtbase/blobs/b9826799405293ee5969015eed37957daad198ee/src/widgets/styles/qmacstyle_mac.mm

Possibly the version of Qt you are using was not compiled with the 10.6 SDK.

There is a known issue: "To use Qt on or for 10.6, you need to build Qt yourself on a 10.6 machine":

http://qt-project.org/wiki/Qt500KnownIssues

stepanbujnak

If you're using Qt 5.1 this is a known issue with macdeployqt, it does not correct linked library paths on the executable, you can see it by yourself with

otool -L <executable>

You can either switch back to Qt 5.1.0-rc1 or in this thread there is a workaround with a script that will fix the problem for you.

The only way to run your application on Mac OS 10.6 with Qt 5 is to configure Qt with -no-c++ parameter. Compiling Qt on 10.6 is not an option for me, because there would be no Retina support.

The correct workaround is:

Mac OS 10.7 + Qt 5.2.0 + xcode 4.6 + configure with -no-c++11 parameter

PS. Use Vmware with 10.7 to compile Qt. Develop and deploy your app on any Mac OS X (10.9.1)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!