问题
I am currently running Windows Vista Home Premium, and I have developed an application with my friend using Qt Creator. We are now trying to deploy our application as just one executable, so we are trying to do a static build. We have added CONFIG += static in our .pro file.
We are using this documentation to help us:
http://doc.trolltech.com/4.1/deployment-windows.html
When I try to build QT, I use this command:
configure -static -platform win32-msvc
Then I get this error:
Creating qmake...
execute: File or path is not found (nmake)
execute: File or path is not found (nmake)
Cleaning qmake failed, return code -1
I think I have to add nmake to my PATH, but I can't find it on my computer. Any help would be greatly appreciated. Thank you.
回答1:
You will find a batch file under the bin directory of your visual studio install called "vcvars32.bat". Run that from the command line before you try building QT. That should solve your problems.
回答2:
Open Visual Studo 20xx Command Prompt and compile Qt inside it!
For instance, on VS2008 I also need to set QMAKESPEC
before trying to configure Qt:
set QMAKESPEC=<QT_DIR>\mkspecs\win32-msvc2008
来源:https://stackoverflow.com/questions/1458252/static-build-in-qt-on-windows-vista