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?
Related
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
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
I'm having troubles getting Qt5 working without GUI elements on my Cortex-A9 board due the OpenGL dependencies (i.e. OpenGL ES2). I am running a Ubuntu 14.04 rootfs.
Is there any way to disable the generation of GUI classes, starting from git repository? (Target version 5.3).
The only modules I need are QtCore, QtXML and QtWebSockets/QtNetwork
The following seems to get Qt5 to compile with a LinuxFB driver and no OpenGL.
./configure -qpa linuxfb -no-largefile -opensource -verbose -release \
-no-accessibility -confirm-license -no-sse -no-sse2 \
-qt-zlib -qt-libpng -nomake examples -nomake demos -nomake docs -nomake tests \
-make libs --prefix=/usr -no-pch -no-iconv -no-nis -no-xkb -no-xshape \
-no-xvideo -no-xsync -no-xinerama -no-xcursor -no-xfixes -no-xrandr -no-kms \
-no-directfb -no-eglfs -no-xcb -no-dbus -no-icu -no-cups -no-gif \
-no-accessibility -no-opengl -nomake quick -make quick1 \
-skip multimedia -skip webkit -nomake webkit -no-pkg-config \
-no-sql-db2 -no-sql-ibase -no-sql-mysql -no-sql-oci \
-no-sql-odbc -no-sql-psql -no-sql-sqlite -no-sql-sqlite2 \
-no-sql-sqlite_symbian -no-sql-tds -nomake tools \
-device linux-custom-g++ -device-option CROSS_COMPILE=$TGT_TOOL_NAME-
The keys are, -no-opengl and -nomake quick. QtQuick2 will pull in OpenGL.
Also it seems I must do the following,
touch module_qtwebkit-make_first
This stops the build system from trying to make QtWebKit; it seems buggy. This still has the GUI classes, but don't link to them. That is before the plain make. For the install target,
touch module_qtwebkit-install_subtargets
was required. Later Qt5 releases may have fixed the QtWebkit build issues.
It seems that at least Qt 5.6.2 supports -no-gui and -no-widgets configuration options.
Ubuntu team itself declared that Qt5.3. is still under investigation for armhf platforms and that probably it will be available from 14.10 release.
Somehow, crawling on Qt forums, there are missing dependencies and compiling errors when there's no OpenGL/GUI module.
I resolved it installing 1t 5.2.1 from repositories and then the missing QWebSocket module from git repository.
In order to make this module compatible with older Qt version, the file .qmake.conf:
MODULE_VERSION = 5.3.2 --> to desired one (i.e. 5.2.1)
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.
I failed to compile qt shared library(64 bit) on windows using various versions of cmake. I think am making some mistakes in selecting cmake options. Can any one point me to some tutorials or tell the steps to be followed. Thanks in advance. (I can't use visual studio for this.)
This post worked for me :
#ECHO OFF
rmdir /Q /S C:\Qt\qt-git-build
mkdir C:\Qt\qt-git-build
cd C:\Qt\qt-git-build
..\qt-git\configure -opensource -mp -qt-zlib
nmake
nmake qdoc3
editbin /STACK:0x200000 bin\qdoc3.exe
nmake docs
nmake install
nmake clean
cd ..