I am trying to deploy a Qt application by linking it to a static version of Qt.
I followed this guide. I have downloaded Qt and compiled it statically. The problem is when I try to link my application to the static version of Qt.
After the application is compiled and linked I check what other libraries the application is linked to:
otool -L QtIntro.app/Contents/MacOs/plugandpaint
//output from command:
QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.3)
QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.3)
QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
Why is my application still linked to dynamic version of Qt and how can I fix it?
In 99% the case, this is because you still have the dynamic libraries in that particular path. As stated in the documentation:
Try to move the
*.frameworksubdirectories somewhere and kick a clean build again.