Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Unable to build a Qt project in command-line
I have a qt 'subdirs' project that I have created in QtCreator and have been able to build and deploy well. There is a need to automate the build. So I am attempting to build the same project from the command-line.
I have Qt version 5.2.1 installed and I have been using the 64-bit msvc2012 version on windows 7.
Qt is installed at C:\Qt\Qt5.2.1. I added C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\bin to PATH (for qmake.exe etc.,), I added C:\Qt\Qt5.2.1\Tools\QtCreator\bin to PATH (for jom.exe), I added the <VS-Install-location>\Common7\IDE (for mvs dependencies), <VS-Install-location>\VC\bin (for cl.exe etc.,).
First I ran qmake.exe (which succeeded).
When I run jom.exe (or nmake for that matter), I get an error
fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory
I know where stddef.h is location on my PC, but how do I enable jom.exe (or nmake) to be able to find it?
You should either start from a Qt command line or at least from a Visual Studio command line. Otherwise there are batch files that you can call to setup the environment for you.
Thanks for the response. I get what you are saying. I am running Qt5.2.1 and I unable to find that (batch) script which will setup the environment for me. Can you tell me where I can find it?
I figured it out. I had to run the vcvarsall.bat script with 'x64' as the argument and setup the the other path variables.
Thanks for your help.
Then please update the thread title prepending [solved] so other forum users may know a solution has been found :)