Error building Qt 5.3.0 - c++

I am trying to compile Qt 5.3.0 to get rid of icu dlls. I have Windows 7 32 bit, MS VS2012. I ran the following command:
configure -nomake examples -nomake tests -opengl desktop -prefix C:\\Qt5.3.0_custom -platform win32-msvc2012 -opensource -c++11 -no-icu
After a large output I got this error:
C:\Qt5.3.0_custom\qtbase\qmake\generators\win32\msvc_nmake.cpp(50) : fatal error
C1083: Cannot open include file: 'windows/registry_p.h': No such file or direct
ory
msvc_vcxproj.cpp
msvc_objectmodel.cpp
C:\Qt5.3.0_custom\qtbase\qmake\generators\win32\msvc_vcproj.cpp(71) : fatal erro
r C1083: Cannot open include file: 'windows/registry_p.h': No such file or direc
tory
msbuild_objectmodel.cpp
cesdkhandler.cpp
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 11.0\VC\BI
N\cl.EXE"' : return code '0x2'
Stop.
Building qmake failed, return code 2

I forgot to execute a batch file, so here is the complete process:
C:\Program Files\Microsoft Visual Studio 11.0\VC\vcvarsall.bat
configure -nomake examples -nomake tests -opengl desktop -prefix C:\\Qt5.3.0_custom -platform win32-msvc2012 -opensource -c++11 -no-icu
nmake

Related

Error U1077 return code

I get an error when I try to compile QT. I compile it with the source in static with openssl. I use this tutorial to make the "build" script
C:\Qt\5.8_Static\src\qt-everywhere-opensource-src-5.8.0\qtbase>configure.bat -static -debug-and-release -platform win32-g++ -prefix C:\Qt\5.8_Static\5.8.0 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -opengl desktop -qt-sql-sqlite -openssl-linked -opensource -confirm-license -make libs -nomake tools -nomake examples -nomake tests
Please wait while bootstrapping configure ...
<srcbase> = C:/Qt/5.8_Static/src/qt-everywhere-opensource-src-5.8.0/qtbase
<outbase> = C:/Qt/5.8_Static/src/qt-everywhere-opensource-src-5.8.0/qtbase
Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. Tous droits réservés.
cl -c -Yc -nologo -Zc:wchar_t -W3 -GR -EHsc -w34100 -w34189 -wd4577 -D
UNICODE -D_CRT_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DQT_U
SE_QSTRINGBUILDER -DQT_VERSION_STR=\"5.8.0\" -DQT_VERSION_MAJOR=5 -DQT_VERSION_M
INOR=8 -DQT_VERSION_PATCH=0 -I"..\..\include" -I"..\..\include\QtCore" -I"..\..\
include\QtCore\5.8.0" -I"..\..\include\QtCore\5.8.0\QtCore" -I"C:\Qt\5.8_Static\
src\qt-everywhere-opensource-src-5.8.0\qtbase\tools\shared" -I"C:\Qt\5.8_Static\
src\qt-everywhere-opensource-src-5.8.0\qtbase\mkspecs\win32-msvc2012" -Fpconfigu
re_pch.pch -Foconfigure_pch.obj -TP C:\Qt\5.8_Static\src\qt-everywhere-opensourc
e-src-5.8.0\qtbase\tools\configure\configure_pch.h
configure_pch.h
c:\qt\5.8_static\src\qt-everywhere-opensource-src-5.8.0\qtbase\include\qtcore\..
/../src/corelib/global/qglobal.h(45): fatal error C1083: Impossible d'ouvrir le
fichier include : 'type_traits' : No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\bin\cl.EXE"' : code retour '0x2'
Stop.

Compiling QT 5.3.2 under windows 7 and msvc

I'm using msvc 2013 (ultimate-64bit), windows 7 64bit.
I compiled icu4c 54.1 by msvc 2013 (64 bit).
And now i try to compile qt 5.3.2-everywhere-opensource-src ( i added patch there (i replaced QWebFrame.cpp))
I used CMD developer tool from visual studio.
--- And i executed these commands:
cd D:\qt
d:
configure -prefix D:\Qt\Qt_making -platform win32-msvc2013 -opensource -c++11 -make tools -make libs -qt-sql-sqlite -no-openssl -icu -I C:\icu-53.1-vs2013\include -L C:\icu-53.1-vs2013\lib64 // all OK - after all, include loaded/ new icu libs loaded
nmake
After 4 command the process interrupted. And displayed error:
with: 36 unresolved externals these 'unresolved externals' is propably about libs.
I make screen of these errors (below):
So whats wrong?
I have to compile QT (in particular QWebKit - becouse of the patch all on 64 bit.)
The last time I compiled Qt for Windows (in order to get the desktop version of OpenGL), here's what I needed to do. Note that this was with VS2010 and Qt 5.0.0 (on Windows 7).
set CL=/MP
if not compiling qtwebkit:
Need to rename/delete the qtwebkit* directories (there's a -no-webkit option but it doesn't work in 5.0.0)
else:
Need ICU, GNU bison, and GNU gperf (either install the prebuilt binaries or build yourself)
if using ICU (required for qtwebkit):
set LIB=%LIB%;C:\icu\lib
set INCLUDE=%INCLUDE%;C:\icu\include
set PATH=C:\icu\bin;%PATH%
set PATH=%PATH%;C:\Program Files (x86)\gperf\bin;C:\bison\bin
cd <path>\qt-everywhere-opensource-src-<version>
configure -prefix C:\Qt\Qt5.0.0-opengl-desktop -opensource -debug-and-release -platform win32-msvc2010 -opengl desktop -no-cetest -nomake tests -nomake examples -confirm-license -ltcg -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -mp
nmake
nmake install
if used ICU:
copy all the DLLs from C:\icu\bin to C:\Qt\Qt5.0.0-opengl-desktop\bin

64bit Qt build on WIndows

I’m trying to build 64bit Qt 5.2.0 from source with Visual Studio 2013. I configure the build with the following options:
configure.bat -c++11 -no-angle -opengl desktop -nomake examples -opensource -nomake tests -confirm-license
Then I simply run nmake.
Unfortunately, the build stops almost immediately with the following error:
SOME_PATH\5.2.0-src\qtbase\src\corelib\codecs\qutfcodec.cpp : fatal error C1083: Cannot open compiler generated file: '.obj\release\qutfcodec.obj': No such file or directory
32bit builds work ok. Did anyone encounter such behavior?

Compiler error when building Qt

I am trying to build Qt myself. I checked out everything and want to run configure now. The Visual Studio 2013 compiler is in PATH but I get this error
C:\Users\Philipp\Desktop\Qt>configure -developer-build -opensource -nomake examp
les -nomake tests -opengl desktop
+ cd qtbase
+ C:\Users\Philipp\Desktop\Qt\qtbase\configure.bat -top-level -developer-build -
opensource -nomake examples -nomake tests -opengl desktop
Please wait while bootstrapping configure ...
<srcbase> = C:/Users/Philipp/Desktop/Qt/qtbase
<outbase> = C:/Users/Philipp/Desktop/Qt/qtbase
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -Yc -nologo -Zm200 -Zc:wchar_t -MT -W3 -GR -EHsc -w34100 -w34189
-DUNICODE -DQT_NO_CODECS -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_LITE_COMPO
NENT -DQT_NO_COMPRESS -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -D_CRT
_SECURE_NO_DEPRECATE -DQT_BOOTSTRAPPED -DQT_BUILD_CONFIGURE -DCOMMERCIAL_VERSION
-I"..\..\include" -I"..\..\include\QtCore" -I"..\..\include\QtCore\5.2.0" -I"..
\..\include\QtCore\5.2.0\QtCore" -I"C:\Users\Philipp\Desktop\Qt\qtbase\tools\sha
red" -I"C:\Users\Philipp\Desktop\Qt\qtbase\mkspecs\win32-msvc2008" -Fpconfigure_
pch.pch -Foconfigure_pch.obj -TP C:\Users\Philipp\Desktop\Qt\qtbase\tools\config
ure\configure_pch.h
configure_pch.h
c:\users\philipp\desktop\qt\qtbase\include\qtcore\../../src/corelib/global/qglob
al.h(46) : fatal error C1083: Cannot open include file: 'stddef.h': No such file
or directory
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\bin\cl.EXE"' : return code '0x2'
Stop.
Does anyone know how to solve this?
Compiler itself in the PATH variable is not enough, it needs to know where include files and libraries are located.
Check vc++ has PATH variables it uses defined (at least both INCLUDE and LIBPATH).
If not you have two options:
Run configure from Developer Command Prompt (you can find it in the Visual Studio Tools program group).
From any command prompt window run VcVars32.bat batch file (or VsVars32.bat) located in Common7\Tools folder under VS installation directory.

Qt and static lib files - how to compile

I need to build a Qt5 64 bit program which links to static .lib libraries (compiled with /MT). I tried changing the lines below from MD to MT:
QMAKE_CFLAGS_RELEASE = -O2 -MT
QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MT -Zi
QMAKE_CFLAGS_DEBUG = -Zi –MTd
in the file D:\Qt\Qt5.0.0src\qtbase\mkspecs\win32-msvc2010\qmake.conf
and recompiling it with
configure -prefix %CD%\qtbase -debug-and-release -opensource -platform win32-msvc2010 -opengl desktop
and then nmaking it, but it failed with:
XPathGrammar.cpp
Generating Code...
lib /NOLOGO /OUT:release\WebCore.lib #C:\Users\Paul\AppData\Local\Temp\WebCore.lib.4480.3319717.jom
LINK : fatal error LNK1181: cannot open input file '.obj\release_shared\SettingsMacros.obj'
jom: D:\Qt\Qt5.0.0src\qtwebkit\Source\WebCore\Makefile.WebCore.Target.Release [release\WebCore.lib] Error 1181
jom: D:\Qt\Qt5.0.0src\qtwebkit\Source\WebCore\Makefile.WebCore.Target [release] Error 2
jom: D:\Qt\Qt5.0.0src\qtwebkit\Source\WebCore\Makefile.WebCore [sub-Target-pri-make_first-ordered] Error 2
jom: D:\Qt\Qt5.0.0src\qtwebkit\Makefile [sub-Source-WebCore-WebCore-pro-make_first-ordered] Error 2
jom: D:\Qt\Qt5.0.0src\Makefile [module-qtwebkit-make_first] Error 2
It seems that the "SettingsMacros.obj" file doesn't get generated. Why is that?
Do I need to include "-static" in the configure string? I know that Qt doesn't get along with /MT but my project needs it otherwise I would not be able to link those .lib files
yes, you do need to add -static. Worked for me.