Static build in Qt on Windows Vista

ぃ、小莉子 提交于 2020-02-05 06:26:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!