I wanted to rebuild Qt5.4.2 for Windows through the Microsoft VC ++ compiler (cl.exe).

but at the finish (or far from the finish) I got the errors:

LINK: fatal error LNK1181: cannot open input file 'qsqlite.lib'

'cd' return code 0x2

How to fix? With WinGW, of course, everything is going. But I need 64-bit applications (MinGW64 is not officially supported by Qt itself), so I would like to build it through the VC compiler.

  • And what you do not like the official assembly? They are also for MSVC, including - ixSci
  • one
    And if you build from the studio itself and want to build Qt all the same, then try setting the number of parallel builds to 1 - ixSci
  • I know that there are ready-made Qt compiler for Microsoft. But the reassembly is aimed at getting a static assembly. I collect not through VS. And through her environment. Well, in the command line with a customized environment. There when you need to enter configure <keys>. Then nmake. And wait. - Zenit Fan
  • show the line how you run configure - ixSci
  • Edited the qmake.conf file. Changed one character. Only one thing didn’t work: specifying the -prefix command <path> ... but this is not so important. Here is this line: configure.bat -release -static% PREFIX% -extprefix% EXTPREFIX% -hostprefix% HOSTPREFIX% -opengl desktop -c ++ 11 -opensource -confirm-license -nomake examples -nomake tests -no-icu -skip qtwebkit -no-sql-sqlite Gathered with it. Thank you @ zenden2k. I didn’t see in help that I can skip component assembly via -skip - Zenit Fan

2 answers 2

There are two options: qsqlite.lib is collected from you or not. If not, look at the build logs and understand why not, but this is already a slightly different problem. If it is assembled, look at the linker flags for additional ways.

  • So she is not going to. And even tried to disable it at the configuration stage via the -no-sql-sqlite line (it was the default in the build configuration list). Uselessly. The same mistake. - Zenit Fan
  • cannot open input file 'qsqlite.lib' means that some other project is trying to open it and cannot, and not that it is not going to. She may lie a little out of place where the project is looking for, producing an error. - Vladimir Martyanov
  • I searched in the whole build log ... among the "stages of the creating library of the name" qsqlite.lib "absolutely nowhere, except this line. she is a mistake. - Zenit Fan
  • In * .pro and * .pri is also not her? - Vladimir Martyanov

Hope you collect in a clean directory? And not in the same directory in which you collected using Mingw?

Most likely this library (qsqlite.lib) is needed not to build qt itself, but to build examples or tests.

Try this:

 configure -nomake examples -nomake tests -static 

I generally collect statically this way:

 configure -debug-and-release -opengl desktop -no-angle -skip qtwebkit -no-icu -release -nomake tests -nomake examples -static -platform win32-msvc2013 -no-sse2 jom module-qtbase 

(because I don't need anything but qtbase)

  • qsqlite.lib is most likely needed for the SQLite driver - ixSci
  • @ixSci qsqlite.lib - this is the sqlite driver. In a non-static build, it is created along with the plugins \ sqldrivers \ qsqlite.dll file - zenden2k
  • With MinGW I already deleted. Removed everything (source and collected). Always collect again. Now once again try to run. - Zenit Fan