c++ - Qt 5 cannot deploy on SnowLeopard -


i have issue app doesn't run on 10.6 snow leopard.

i compile these parameters:

qmake lspro.pro -r -spec macx-clang config+=release config+=x86_64 

in pro file, have these elements:

template = app headers = \     mainwindow.h \     app_mediamanager.h \     api.h \     tool_htmleditor.h \     tool_videoencoder.h \     tool_thumbnaileditor.h sources = \     main.cpp \     mainwindow.cpp \     app_mediamanager.cpp \     api.cpp \     tool_htmleditor.cpp \     tool_videoencoder.cpp \     tool_thumbnaileditor.cpp  qt += network webkitwidgets widgets concurrent sql  qmake_cxxflags_x86_64 += -mmacosx-version-min=10.6 qmake_macosx_deployment_target = 10.6  icon = icon.icns  resources = lspro.qrc 

but simple hello world or example files, doesn't work...

i add libraries macdeployqt script. when running on 10.6 error in report:

dyld error message:   library not loaded: /usr/lib/libc++.1.dylib   referenced from: /users/username/desktop/lspro.app/contents/macos/../frameworks/qtwebkitwidgets.framework/versions/5/qtwebkitwidgets   reason: image not found 

the question simple: how can target 10.6 clean qt5 in 10.8?


update 1:

thanks comments, looks 10.6 didn't shipped c++11 support yet, causing app crash when looking it. tried 2 solutions:

failed solution1 : rebuild qt5 noc++11 flag, resulting app starts on snowleopard fails inner elements videoplayer missing in qwebkit, unable call external binary /execute command (app crashes exc_bad_access) although binary runs fine when called directly , more undiscovered.

failed solution2 : tried naively include missing dylibs (libc++.1.dylib , libc++abi.dylib) in snowleopard, app still crashes message :

dyld error message:   symbol not found: _nspreferredscrollerstyledidchangenotification   referenced from: /volumes/sans titre/tests/lspro1.app/contents/macos/../frameworks/qtwidgets.framework/versions/5/qtwidgets   expected in: /system/library/frameworks/appkit.framework/versions/c/appkit 

otool -l of 5.1.0 rc1 build

@executable_path/../frameworks/qtwebkitwidgets.framework/versions/5/qtwebkitwidgets (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtquick.framework/versions/5/qtquick (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtqml.framework/versions/5/qtqml (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtnetwork.framework/versions/5/qtnetwork (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtcore.framework/versions/5/qtcore (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtgui.framework/versions/5/qtgui (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtopengl.framework/versions/5/qtopengl (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtwidgets.framework/versions/5/qtwidgets (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtprintsupport.framework/versions/5/qtprintsupport (compatibility version 5.1.0, current version 5.1.0)     /system/library/frameworks/cocoa.framework/versions/a/cocoa (compatibility version 1.0.0, current version 19.0.0)     @executable_path/../frameworks/qtwebkit.framework/versions/5/qtwebkit (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtsql.framework/versions/5/qtsql (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtsensors.framework/versions/5/qtsensors (compatibility version 5.1.0, current version 5.1.0)     @executable_path/../frameworks/qtconcurrent.framework/versions/5/qtconcurrent (compatibility version 5.1.0, current version 5.1.0)     /system/library/frameworks/opengl.framework/versions/a/opengl (compatibility version 1.0.0, current version 1.0.0)     /system/library/frameworks/agl.framework/versions/a/agl (compatibility version 1.0.0, current version 1.0.0)     /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)     /usr/lib/libsystem.b.dylib (compatibility version 1.0.0, current version 169.3.0) 

solution:

ok got work. compiled qt5 (5.1.2) on snowleopard git (have xcode 4.2 10.6 sdk) in case these config:

./configure -developer-build -opensource -nomake examples -nomake tests -qt-sql-mysql 

i had fix small elements in code making app crash without reason (variable names..) , ok.

just don't forget use mac deploy tool on 10.6 , app runs ok on 10.8 (untested on 10.7 assume ok.)

hope helps anyone.

the nspreferredscrollerstyledidchangenotification notification available in osx 10.7 , later, noted @ bottom of page:

https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/nsscroller_class/reference/reference.html

qt 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 version of qt using not compiled 10.6 sdk.

there known issue: "to use qt on or 10.6, need build qt on 10.6 machine":

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


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -