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. [SOLVED] How to build Qt 4.7 on win7(x64)?
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] How to build Qt 4.7 on win7(x64)?

Scheduled Pinned Locked Moved Installation and Deployment
11 Posts 3 Posters 6.3k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    dNaga392
    wrote on last edited by
    #1

    Hi,

    I want to install Qt 4.7 on windows 7 64bit.
    I downloaded qt-everywhere-opensource-src-4.7.1.tar.gz.

    And I tryed to install to refer to this page.
    http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/

    I can finish to build Qt library (with Visual Studio x64 Win64 Command Prompt (2010)).
    However I can't build Qt project.

    For example,

    @>qmake -project

    qmake hello.pro
    make
    make -f Makefile.Debug
    make[1]: Entering directory /c/Work/Qt/hello' Makefile.Debug:58: *** missing separator. Stop. make[1]: Leaving directory /c/Work/Qt/hello'
    make: *** [debug] Error 2

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

        "c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\nmake.
    

    exe" -f Makefile.Debug

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

        link /LIBPATH:"c:\Qt\4.7.1\lib" /NOLOGO /DEBUG /MANIFEST /MANIFESTFILE:"
    

    debug\hello.intermediate.manifest" /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type=
    'win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToke
    n='6595b64144ccf1df' language='' processorArchitecture=''" /OUT:debug\hello.ex
    e @C:\Users\UserName\AppData\Local\Temp\nm51C8.tmp
    QtGuid4.lib(QtGuid4.dll) : fatal error LNK1112: module machine type ‘x64′ conflicts with target machine type ‘X86′
    NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\amd64\link.EXE"' : return code '0x458'
    Stop.
    NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\amd64\nmake.exe"' : return code '0x2'
    Stop.
    @
    My environment is as follows:

    • Win7 Pro SP1(x64)
    • Visual Studio 2010 SP1
    • Qt 4.7.1
    • Qt Add-in 1.1.11

    I tryed to install to change Qt version or configure options, but they were failed all.
    What is wrong?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You need to download the .zip package, not tarball.

      (Z(:^

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dNaga392
        wrote on last edited by
        #3

        Oh, I see... I got it.
        I try it now. Thanks for your advice!

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          To add to sierdzio, beware of your Visual Studio project architecture, you're having a mismatch there e.g. not using a 64 bit command line when creating the project ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • D Offline
            D Offline
            dNaga392
            wrote on last edited by
            #5

            Unn... I got same result when I replaced a zipped source file.

            [quote author="SGaist" date="1401174432"]Hi and welcome to devnet,

            To add to sierdzio, beware of your Visual Studio project architecture, you're having a mismatch there e.g. not using a 64 bit command line when creating the project ?[/quote]

            Thank you, Mr. SGaist!
            Oh.. I didn't check it.

            I will try to run "vcvarsall.bat amd64" before a configure command.
            Is this correct?

            1 Reply Last reply
            0
            • D Offline
              D Offline
              dNaga392
              wrote on last edited by
              #6

              I run following commands (every line is a different command: type it then press Enter):

              @>vcvarsall.bat amd64

              cd c:\Qt\4.7.1
              configure -debug-and-release -opensource -platform win32-msvc2010
              ..\jom\jom.exe -j 4@

              But, I can't get a good result(, because I get same result).

              I check a command line, then this look like a 64 bit command line.

              @>cl -help

              Microsoft(R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64
              Copyright (C) Microsoft Corporation. All rights reserved.

                                   C/C++ COMPILER OPTIONS
              

              ... @

              What I need to do other, for the solution of this problem?

              1 Reply Last reply
              0
              • sierdzioS Offline
                sierdzioS Offline
                sierdzio
                Moderators
                wrote on last edited by
                #7

                Hm, I am not sure, but some old versions of Qt required running configure.exe instead of configure.

                Also, try adding -arch x64 to the configure line.

                (Z(:^

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dNaga392
                  wrote on last edited by
                  #8

                  [quote author="sierdzio" date="1401188082"]Hm, I am not sure, but some old versions of Qt required running configure.exe instead of configure.

                  Also, try adding -arch x64 to the configure line.[/quote]

                  Thank you, Mr. sierxzio!
                  When I tryed adding -arch x64, I failed to run a jom command (and a nmake command too).

                  This is its error message.

                  In case a jom command:
                  @c:\qt\4.7.0\include\qtcore../../src/corelib/arch/qatomic_arch.h(92) : fatal error C1189: #error : "Qt has not been ported to this architecture"

                  jom: C:\Qt\4.7.0\src\winmain\Makefile.Release [tmp\obj\release_shared\qtmain_win.obj] Error 2
                  jom: C:\Qt\4.7.0\src\winmain\Makefile [release-all] Error 2
                  jom: C:\Qt\4.7.0\Makefile [sub-winmain-make_default-ordered] Error 2@

                  In case a nmake command:
                  @c:\qt\4.7.0\include\qtcore../../src/corelib/arch/qatomic_arch.h(92) : fatal error C1189: #error : "Qt has not been ported to this architecture"

                  NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
                  Stop.
                  NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
                  Stop.
                  NMAKE : fatal error U1077: 'cd' : return code '0x2'
                  Stop.@

                  Does this message mean this command line is not 64 bit?

                  1 Reply Last reply
                  0
                  • sierdzioS Offline
                    sierdzioS Offline
                    sierdzio
                    Moderators
                    wrote on last edited by
                    #9

                    Maybe try with Qt 4.8.6?

                    (Z(:^

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      dNaga392
                      wrote on last edited by
                      #10

                      Thank you, Mr. sierdzio.
                      But I became possible to build to use Qt 4.7.1 libraries on VC2010, after to rebuild this libraries.

                      A cause of this problem is outside their method...
                      I have a misunderstanding how to use add-in.

                      Until tomorrow, I opened a solution file(*.sln) of Qt project
                      (created by a qmake -tp vc command). But it is wrong.

                      I can x64 debug build a Qt project from a Qt project file(*.pro) by add-in .

                      At first time, it was failed before post a question to this forum.
                      Maybe, this problem had other causes then.

                      .

                      ...And I'm worry about something.
                      It is failed to build by make and nmake commands on command line.
                      Is this correct?

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        dNaga392
                        wrote on last edited by
                        #11

                        O.K.
                        I don't understand make errors.
                        But, I mark [SOLVED] on this title because I became possible to use Qt 4.7.

                        Many thanks, Mr. sierdzio and Mr. SGaist!

                        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