Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Building Qt 5.0.1 in Windows 8 with Visual Studio 2012

Building Qt 5.0.1 in Windows 8 with Visual Studio 2012

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 2 Posters 4.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rafa76
    wrote on last edited by
    #1

    Hi everyone!
    I'm new to Qt, so excuse me if this is a basic question.

    I'm trying to build 32bit Qt 5.0.1 in Windows 8 (64bit) with Visual Studio 2012.

    I have downloaded qt-everywhere-opensource-src-5.0.1.zip and extracted it into c:\sdk\Qt\Qt5.0.1_src.

    Afterwards I open the VS2012 x86 Native Tools Command Prompt and run the following batch to configure and build Qt: (the source is in c:\sdk\Qt\Qt5.0.1_src, the batch is in c:\sdk\Qt, and the Qt build will be at c:\sdk\Qt\Qt5.0.1_release_vc110_w32 after completion):

    @Call Setup_32bit_env_vars.bat
    MKDIR Qt5.0.1_release_vc110_w32
    CD Qt5.0.1_release_vc110_w32
    SET log_file=..\build.log
    C:\SDK\Qt\Qt5.0.1_src\qtbase\configure.exe -prefix C:\SDK\Qt\Qt5.0.1_release_vc110_w32 -release -opensource -confirm-license -shared -make tools -make libs -nomake examples -nomake tests -qt-sql-mysql -l libmysql -qt-sql-odbc -l odbc32 -qt-sql-sqlite -l SQLite3 -platform win32-msvc2012 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -openssl -l libeay32 -l ssleay32 -mp >> %log_file% 2>&1
    C:\SDK\QT\JOM\jom.exe -j 8 >> %log_file% 2>&1
    ECHO Finished building!@

    The above mentioned Setup_32bit_env_vars.bat is as follows:
    @SET QTDIR=C:\SDK\Qt\Qt5.0.1_src\qtbase
    SET QMAKESPEC=C:\SDK\Qt\Qt5.0.1_src\qtbase\mkspecs\win32-msvc2012
    SET PATH=C:\SDK\Python\ActivePython2.7_w32;C:\SDK\Python\ActivePython2.7_w32\Scripts;C:\SDK\Python\ActivePython2.7_w32\DLLs;C:\SDK\Perl\StrawberryPerl5.16_w32\c\bin;C:\SDK\Perl\StrawberryPerl5.16_w32\perl\site\bin;C:\SDK\Perl\StrawberryPerl5.16_w32\perl\bin;C:\SDK\Ruby\Ruby200_w32\bin;C:\SDK\icu4c_50.1.2\bin;C:\SDK\OpenSSL\openssl-1.0.1e_release_vc110_w32\bin;C:\SDK\Qt\Qt5.0.1_src\qtbase\bin;C:\SDK\Qt\Qt5.0.1_src\qtbase\gnuwin32\bin;%PATH%
    SET INCLUDE=C:\SDK\icu4c_50.1.2\include;C:\SDK\OpenSSL\openssl-1.0.1e_release_vc110_w32\include;C:\SDK\mysql-5.6.10\include;C:\Program Files (x86)\Windows Kits\8.0\Include\um;C:\SDK\SQLite_3.7.15.2\source\SQLite3;%INCLUDE%
    SET LIB=C:\SDK\icu4c_50.1.2\lib;C:\SDK\OpenSSL\openssl-1.0.1e_release_vc110_w32\lib;C:\SDK\mysql-5.6.10\libmysql\release;C:\Program Files (x86)\Windows Kits\8.0\Lib\win8\um\x86;C:\SDK\SQLite_3.7.15.2\bin\release_vc110_w32;%LIB%@

    The script listed above completes successfully without any errors and I get the Qt dlls at C:\SDK\Qt\Qt5.0.1_release_vc110_w32\bin.

    The problem is that I only get the following dlls: libEGL.dll, libGLESv2.dll, Qt5Concurrent.dll, Qt5Core.dll, Qt5Gui.dll, Qt5Network.dll, Qt5OpenGL.dll, Qt5PrintSupport.dll, Qt5Sql.dll, Qt5Test.dll, Qt5Widgets.dll, Qt5Xml.dll

    My question is: What should I do to build the remaining libraries like Qt5Multimedia.dll, Qt5Qml.dll, Qt5Quick.dll, Qt5Script.dll, Qt5Svg.dll, Qt5WebKit.dll, ... I did read that Qt5 is now more modular, but couldn't find any instructions on how to build the remaining modules. Do I need to download something more? Please help!!

    Note:
    If I use nmake instead of jom I get the error listed bellow. Is this a known bug, or nmake requires a different kind of setup?
    @
    ...
    cd libGLESv2\ && ( if not exist Makefile C:\SDK\Qt\Qt5.0.1_release_vc110_w32\bin\qmake C:\SDK\Qt\Qt5.0.1_src\qtbase\src\angle\src\libGLESv2\libGLESv2.pro -o Makefile ) && "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe" -f Makefile install

    Microsoft (R) Program Maintenance Utility Version 11.00.51106.1
    Copyright (C) Microsoft Corporation. All rights reserved.

    "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe" -f Makefile.Release install

    Microsoft (R) Program Maintenance Utility Version 11.00.51106.1
    Copyright (C) Microsoft Corporation. All rights reserved.

    NMAKE : fatal error U1073: don't know how to make 'C:\SDK\Qt\Qt5.0.1_release_vc110_w32\lib\translator_common.lib'
    ...
    @

    1 Reply Last reply
    0
    • R Offline
      R Offline
      rafa76
      wrote on last edited by
      #2

      If, for example, I add the -svg option to configure like this:
      @C:\SDK\Qt\Qt5.0.1_src\qtbase\configure.exe -prefix C:\SDK\Qt\Qt5.0.1_release_vc110_w32 -release -opensource -confirm-license -shared -make tools -make libs -nomake examples -nomake tests -qt-sql-mysql -l libmysql -qt-sql-odbc -l odbc32 -qt-sql-sqlite -l SQLite3 -platform win32-msvc2012 -qt-zlib -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -svg -openssl -l libeay32 -l ssleay32 -mp@

      I get this error:
      Preparing build tree...
      Unknown option -svg
      Usage: configure [options]

      In fact, if I run qtbase\configure.exe -help, there is no svg or webkit option.

      No one had this problem before??

      1 Reply Last reply
      0
      • O Offline
        O Offline
        obrousse
        wrote on last edited by
        #3

        Can I ask you why you modified the Setup_32bit_env_vars.bat file? I thought that adding -I and -L options to configure command should work too but it seems that it is not (at least on my windows8 platform).

        I'm not really up for modifying visual studio system files but if you tell me that it is the best way to have Qt compiled I'll go for this solution.

        I hope that you are still watching this thread and that we can help each other.

        Best regards,
        obrousse.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rafa76
          wrote on last edited by
          #4

          I didn't modify any system files.

          The Setup_32bit_env_vars.bat is a batch file I wrote myself to setup variables related to other library files (mysql, sqlite, icu,...).

          1 Reply Last reply
          0
          • O Offline
            O Offline
            obrousse
            wrote on last edited by
            #5

            Ok thank you a lot for this correction I misunderstood and thought you modified Setvar.bat or something like that. I'll try your solution quickly.

            1 Reply Last reply
            0
            • R Offline
              R Offline
              rafa76
              wrote on last edited by
              #6

              Ok. Let me know how it worked.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved