LNK
LNK

Reputation: 191

Cannot compile Qt from source using nmake install

I am trying to compile Qt5.7 from source according to this tutorial. I have created qt5vars.cmd file:

cd "C:\Qt_all\qt-everywhere-opensource-src-5.7.0"
CALL "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
SET _ROOT="C:\Qt_all\qt-everywhere-opensource-src-5.7.0"
SET PATH=%_ROOT%\qtbase\bin;%_ROOT%\gnuwin32\bin;%PATH%
SET QMAKESPEC=win32-msvc2015
SET _ROOT=

I open it with cmd:

C:\Qt_all\qt5vars.cmd

after that in cmd:

configure -debug-and-release -opensource -platform win32-msvc2015 -nomake examples -nomake tests
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake"

In that case everything works but the Qt binaries are compiled into 'source code' folder. Now I want to compile into another folder. I completely deleted the 'source code' folder (with compiled binaries) and copy pure source code' folder. After that in cmd:

C:\Qt_all\qt5vars.cmd
configure -debug-and-release -opensource -platform win32-msvc2015 -nomake examples -nomake tests -prefix "C:\Qt_all\Kits\Qt5.7MSVC2015_64bit"
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\nmake" install

And that gives an error:

LINK : fatal error LNK1104: cannot open file "C:\Qt_all\qt-everywhere-opensource-src-5.7.0\qtbase\lib\qtpcred.lib"

Upvotes: 1

Views: 923

Answers (1)

You have to execute nmake and only then nmake install. You also probably want to use jom -j%NUMBER_OF_PROCESSORS%, not nmake, to speed things up. Jom comes with Qt Creator, you can also get it from here.

Upvotes: 3

Related Questions