资料来源:http://stackoverflow.com/questions/15340688/how-to-build-qt-5-statically
问题:
So I added to my .pro file this line :
CONFIG += static
To compile my project statically.
解决方案:
The Qt shared libraries don't exist on the other computer you tested it on. So you need to either:
- Copy the shared libraries to your other machine. Or...
- Create a static Qt build to link with your application.
It's not sufficient to just add CONFIG
+= static
to your .pro file, you also need Qt static libraries. So to do #2 you'll need to get the Qt source code and build it yourself.
如何编译http://qt-project.org/wiki/How-to-build-a-static-Qt-for-Windows-MinGW