[Interest] Source build on windows

Sze Howe Koh szehowe.koh at gmail.com
Mon Aug 11 03:44:00 CEST 2014


Hi Darren,

On 11 August 2014 09:16, Darren Dale <dsdale24 at gmail.com> wrote:
> I'm building from source on windows. Have followed the instructions at
> http://qt-project.org/doc/qt-5/windows-building.html and
> http://qt-project.org/doc/qt-5/windows-requirements.html, installed runtime
> and build dependencies (ICU 53.1, active perl, ruby, python 2.7.8, certain
> they are accessible on PATH), installed the Visual C++ 2010 SP1 and SDK 7.1
> and compiler update, DirectX SDK, but when I attempt to build the sources
> from the single zip qt-everywhere-opensource-src-5.3.1.tar.gz, I eventually
> run into an error which others have reported in the past (someone posted the
> error message posted at https://gist.github.com/azbesthu/3699271) as a
> missing build dependency in some project file. But the few hits on google
> seem to indicate that the problem has already been resolved. Has anyone been
> successful building from source on windows, including qtwebkit?

For Windows, use qt-everywhere-opensource-src-5.3.1.zip instead of
qt-everywhere-opensource-src-5.3.1.tar.gz. The Downloads page
(http://qt-project.org/downloads) says, "The source code is also
available as a single zip(282 MB) file for Windows users or as tar.gz
(227 MB) file for Linux/Mac users."

(I believe that's the root cause of your issue -- the rest of this
email are just notes)


> The bld.bat script I have been using is here:
>
>
> :: may need to change these depending on environment:
> CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
>
> set QMAKESPEC=win32-msvc2010

You don't need to set QMAKESPEC. The configure script auto-detects
your compiler.

But if you want to be explicit, I'd use the -platform configure option
instead (see http://qt-project.org/doc/qt-5/configure-options.html)


> cd C:\Users\darren\qt5
>
> set SRC_DIR=C:\Users\darren\qt5
> set PREFIX=C:\Users\darren\qtlib
>
> :: set path to find resources shipped with qt-5:
> set PATH=%SRC_DIR%\gnuwin32\bin;%PATH%
> set PATH=%SRC_DIR%\qtrepotools\bin;%PATH%
> set PATH=%SRC_DIR%\qtbase\bin;%PATH%

You don't need to add qtbase to your PATH.

I don't think you need qtrepotools either -- that contains tools for
developing  Qt itself.


> :: make sure we can find ICU:
> set INCLUDE=%PREFIX%\include;%INCLUDE%
> set LIB=%PREFIX%\libs;%LIB%
> set PATH=%PREFIX%\DLLs;%PATH%
>
> :: this needs to be CALLed due to an exit statement at the end of configure:
> CALL configure -prefix %PREFIX% ^
>       -libdir %PREFIX%\lib ^
>       -bindir %PREFIX%\lib\qt5\bin ^
>       -headerdir %PREFIX%\include\qt5 ^
>       -archdatadir %PREFIX%\lib\qt5 ^
>       -datadir %PREFIX%\share\qt5 ^
>       -opensource ^
>       -confirm-license ^
>       -no-warnings-are-errors ^
>       -nomake examples ^
>       -nomake tests ^
>       -fontconfig ^
>       -qt-libpng ^
>       -qt-zlib
>
> jom
> nmake install

Why do you mix jom and nmake? (It shouldn't be an issue since jom is
designed to be an nmake clone -- I'm just curious)


Regards,
Sze-Howe



More information about the Interest mailing list