Problem adding support for older versions of macOS (Qt 6.4.2 - MacOS 10.15)
-
Hi! I have configured my Qt 6.4.2 project using cmake, and I would like to make the final application available to run on MacOS versions from 10.15 (the minimum required by Qt6).
To do this, I have added the following line to the
CMakeLists.txt
of the project:set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version").
The problem appears in that, when generating the final application, I get multiple warnings of this type:
ld: warning: dylib (/usr/local/opt/qt6/lib/QtWidgets.framework/Versions/A/QtWidgets) was built for newer macOS version (13.0) than being linked (10.15)
The result of this is that my application runs successfully on the latest macOS version (13.0) but not on the previous ones.
How can I make sure that the libraries that I try to link support older versions of MacOS, in particular since 10.15?
Thanks in advance :)
-
Specifically, the error I receive when running the final application on MacOS 10.15 is as follows:
dyld: Symbol not found: ZNKSt3115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv Referenced from: /Applications/MyApp.app/Contents/MacOS/../Frameworks/QtWidgets.framework/Versions/A/QtWidgets (which was built for Mac OS X 13.0) Expected in: /usr/lib/libc++.1.dylib
-
I have also tried to build the final application from a Windows 11 using windeployqt, and everything seems to work fine. However, if I try to launch the app on a Windows 10 machine, the result is a "white screen".
Is it necessary to build the apps from a computer that has the minimum OS version required for the app? If not, is there any way to know if there are missing Qt libraries for those systems and which ones?