Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to compile QT open-source for windows 64 bit using visual studio 2012

How to compile QT open-source for windows 64 bit using visual studio 2012

Scheduled Pinned Locked Moved General and Desktop
qt 4.8visual studiocompilation
9 Posts 4 Posters 5.8k 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.
  • J Offline
    J Offline
    John R
    wrote on last edited by
    #1

    Dear All,

    How can I compile QT open-source 4.8.4 MinGW version for Windows 64 bit using Visual Studio 2012 - Professional? what are the step by step procedure of this compilation? There are some tips and queries I could find in forums to do the compilation and most of those are for win32 and they are recommending visual studio 2010 I don’t know why? I have only VS2012! Those explanations are bit confusing and I am newbie in QT and unfamiliar with open-source compilation and its keywords changes. It is difficult and time consuming for me to change visual studio 2012 to 2010 so I hope compilation will be possible
    with Qt-MinGW version and VS2012. Somebody please help me soon!!

    JKSHJ 1 Reply Last reply
    0
    • J John R

      Dear All,

      How can I compile QT open-source 4.8.4 MinGW version for Windows 64 bit using Visual Studio 2012 - Professional? what are the step by step procedure of this compilation? There are some tips and queries I could find in forums to do the compilation and most of those are for win32 and they are recommending visual studio 2010 I don’t know why? I have only VS2012! Those explanations are bit confusing and I am newbie in QT and unfamiliar with open-source compilation and its keywords changes. It is difficult and time consuming for me to change visual studio 2012 to 2010 so I hope compilation will be possible
      with Qt-MinGW version and VS2012. Somebody please help me soon!!

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      Hi,

      @John-R said:

      There are some tips and queries I could find in forums to do the compilation and most of those are for win32 and they are recommending visual studio 2010 I don’t know why? I have only VS2012!

      • The steps for 32-bit and 64-bit compilation are the same.
      • The steps for Visual Studio 2010 and Visual Studio 2012 are the same.

      Those explanations are bit confusing and I am newbie in QT and unfamiliar with open-source compilation and its keywords changes.

      If you give a detailed list of what you find confusing, someone could help you out.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      J 1 Reply Last reply
      0
      • JKSHJ JKSH

        Hi,

        @John-R said:

        There are some tips and queries I could find in forums to do the compilation and most of those are for win32 and they are recommending visual studio 2010 I don’t know why? I have only VS2012!

        • The steps for 32-bit and 64-bit compilation are the same.
        • The steps for Visual Studio 2010 and Visual Studio 2012 are the same.

        Those explanations are bit confusing and I am newbie in QT and unfamiliar with open-source compilation and its keywords changes.

        If you give a detailed list of what you find confusing, someone could help you out.

        J Offline
        J Offline
        John R
        wrote on last edited by
        #3

        @JKSH,

        Okay, thank you very much for the response!!

        Please find my reference URL in which I have following doubts

        http://stackoverflow.com/questions/12113400/compiling-qt-4-8-x-for-visual-studio-2012

        Doubt Line 1:

        Go to mkspecs\win32-msvc2010. Open qmake.conf and change:

        As per above line and VS 2012 and for 64 bit, which mkspecs folder I have to open instead of win32-msvc2010?? Is it win32-msvc2012??

        Doubt Line 2:

        change below

        QMAKE_COMPILER_DEFINES += _MSC_VER=1600 WIN32

        to:

        QMAKE_COMPILER_DEFINES += _MSC_VER=1700 WIN32

        The above changes is looks like compilation keyword for Windows 32. If I have to do for 64 bit, then what keyword I have to write instead of " += _MSC_VER=1600 WIN32" & "+= _MSC_VER=1700 WIN32" ???

        don’t know where is this file HashSet.h ? & what is the path of this Hash file?

        and all the directions are pointing on win32!! Why there is no win64?? Or any such folder in mkspecs
        did I misunderstood anything?? Could anyone please help me on this?

        1 Reply Last reply
        0
        • Chris KawaC Offline
          Chris KawaC Offline
          Chris Kawa
          Lifetime Qt Champion
          wrote on last edited by Chris Kawa
          #4

          These instructions are old. For Qt 4.8.4 You don't need to modify anything for VS2012 as there is win32-msvc2012 directory in the mkspecs already. For the configure step pass -platform win32-msvc2012.

          win32 is a historical name of a platform. 32 does not refer to 32 bit Windows (it did in the ancient 16bit Windows times). Nowadays it is for both 32 and 64 bit Windows.

          The resulting libraries depend on the compiler config you use.
          If you compile Qt from the "VS2012 x64 Native Tools Command Prompt" it will build 64 bit version.

          As for the HashSet.h problem it is a known bug in 4.8.4 (tracked by QTBUG-31882). Consider using Qt 4.8.6. If it's still not fixed there (the bug report is not specific on that unfortunately ) then the file in question is in
          src\3rdparty\webkit\Source\JavaScriptCore\wtf\ directory.

          J 1 Reply Last reply
          2
          • Chris KawaC Offline
            Chris KawaC Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Also, if I may suggest, if you don't feel sure about compiling this stuff yourself, you can use one of the builds for all the VS and MinGW configurations that are not provided officially from this site.
            I used it many times and it's always a great time saver.

            J 1 Reply Last reply
            1
            • Chris KawaC Chris Kawa

              Also, if I may suggest, if you don't feel sure about compiling this stuff yourself, you can use one of the builds for all the VS and MinGW configurations that are not provided officially from this site.
              I used it many times and it's always a great time saver.

              J Offline
              J Offline
              John R
              wrote on last edited by
              #6

              @Chris-Kawa ,

              This is a great resource!! thanks for suggesting this, will be always useful and I bookmarked :)
              still I will try for VS compiling because I want to learn and familiar with that task, which may be useful at urgent times.. I may have doubts :)

              1 Reply Last reply
              0
              • Chris KawaC Chris Kawa

                These instructions are old. For Qt 4.8.4 You don't need to modify anything for VS2012 as there is win32-msvc2012 directory in the mkspecs already. For the configure step pass -platform win32-msvc2012.

                win32 is a historical name of a platform. 32 does not refer to 32 bit Windows (it did in the ancient 16bit Windows times). Nowadays it is for both 32 and 64 bit Windows.

                The resulting libraries depend on the compiler config you use.
                If you compile Qt from the "VS2012 x64 Native Tools Command Prompt" it will build 64 bit version.

                As for the HashSet.h problem it is a known bug in 4.8.4 (tracked by QTBUG-31882). Consider using Qt 4.8.6. If it's still not fixed there (the bug report is not specific on that unfortunately ) then the file in question is in
                src\3rdparty\webkit\Source\JavaScriptCore\wtf\ directory.

                J Offline
                J Offline
                John R
                wrote on last edited by
                #7

                @Chris-Kawa,

                Thank you very much for guiding me , it is very useful to me

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  grazia88g
                  wrote on last edited by
                  #8

                  Hi,
                  has anyone ever done the same for Visual Studio 2010?
                  Thanks

                  JKSHJ 1 Reply Last reply
                  0
                  • G grazia88g

                    Hi,
                    has anyone ever done the same for Visual Studio 2010?
                    Thanks

                    JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by
                    #9

                    @grazia88g said in How to compile QT open-source for windows 64 bit using visual studio 2012:

                    has anyone ever done the same for Visual Studio 2010?

                    Qt 5.7 and newer cannot be built with Visual Studio 2010

                    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                    1 Reply Last reply
                    2

                    • Login

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