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. Visual Studio 2010 nmake error
Qt 6.11 is out! See what's new in the release blog

Visual Studio 2010 nmake error

Scheduled Pinned Locked Moved Installation and Deployment
26 Posts 14 Posters 73.2k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #12

    Looks like some file path variable isn't set correctly. Check your environment variables.

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #13

      OK, here it is this time:

      @Setting environment for using Microsoft Visual Studio 2010 x86 tools.

      C:Program FilesMicrosoft Visual Studio 10.0VC>cd %QTDIR%

      C:Qt4.7.2-vc>configure -debug-and-release -opensource -platform win32-msvc2010

      This is the Qt for Windows Open Source Edition.

      You are licensed to use this software under the terms of
      the GNU Lesser General Public License (LGPL) version 2.1
      or the GNU General Public License (GPL) version 3.

      Type '3' to view the GNU General Public License version 3 (GPLv3).
      Type 'L' to view the Lesser GNU General Public License version 2.1 (LGPLv2.1).
      Type 'y' to accept this license offer.
      Type 'n' to decline this license offer.

      Do you accept the terms of the license?
      y
      Environment:
      INCLUDE=
      C:Program FilesMicrosoft Visual Studio 10.0VCINCLUDE
      C:Program FilesMicrosoft Visual Studio 10.0VCATLMFCINCLUDE
      C:Program FilesMicrosoft SDKsWindowsv7.0Ainclude

      LIB=
        C:Program FilesMicrosoft Visual Studio 10.0VCLIB
        C:Program FilesMicrosoft Visual Studio 10.0VCATLMFCLIB
        C:Program FilesMicrosoft SDKsWindowsv7.0Alib
      
      PATH=
        C:Program FilesMicrosoft F#v4.0
        C:Program FilesMicrosoft Visual Studio 10.0VSTSDBDeploy
        C:Program FilesMicrosoft Visual Studio 10.0Common7IDE
        C:Program FilesMicrosoft Visual Studio 10.0VCBIN
        C:Program FilesMicrosoft Visual Studio 10.0Common7Tools
        c:WindowsMicrosoft.NETFrameworkv4.0.30319
        c:WindowsMicrosoft.NETFrameworkv3.5
        C:Program FilesMicrosoft Visual Studio 10.0VCVCPackages
        C:Program FilesHTML Help Workshop
        C:Program FilesMicrosoft SDKsWindowsv7.0AbinNETFX 4.0 Tools
        C:Program FilesMicrosoft SDKsWindowsv7.0Abin
        C:Perlsitebin
        C:Perlbin
        C:Program FilesCommon FilesMicrosoft SharedWindows Live
        C:Windowssystem32
        C:Windows
        C:WindowsSystem32Wbem
        C:Program FilesZipGenius 6
        c:Program FilesMicrosoft SQL Server100ToolsBinn
        c:Program FilesMicrosoft SQL Server100DTSBinn
        C:PROGRA~1TIEDUC~1TI-83P~1UTILS
        C:WindowsSystem32WindowsPowerShellv1.0
        C:Program FilesWindows LiveShared
        C:Program FilesCalibre2
        C:Program FilesTortoiseHg
        C:Program FilesTortoiseSVNbin
        C:Program FilesQuickTimeQTSystem
        C:Qt4.7.2-vc
        C:Qt4.7.2-vcbin
        C:Program FilesMercurial
      

      You are licensed to use this software under the terms of the GNU GPL version 3.Y
      ou are licensed to use this software under the terms of the Lesser GNU LGPL vers
      ion 2.1.
      See C:/Qt/4.7.2-vc3

      or C:/Qt/4.7.2-vcL

      Configuration:
      minimal-config
      small-config
      medium-config
      large-config
      full-config
      build_all
      debug
      Qt Configuration:
      release
      debug
      zlib
      png
      accessibility
      qt3support
      opengl
      s60
      ipv6
      script
      scripttools
      xmlpatterns
      phonon
      phonon-backend
      multimedia
      audio-backend
      declarative
      native-gestures
      svg
      minimal-config
      small-config
      medium-config
      large-config
      full-config

      QMAKESPEC...................win32-msvc2010 (commandline)
      Architecture................windows
      Maketool....................nmake
      Debug symbols...............yes
      Link Time Code Generation...no
      Accessibility support.......yes
      STL support.................yes
      Exception support...........yes
      RTTI support................yes
      MMX support.................yes
      3DNOW support...............yes
      SSE support.................yes
      SSE2 support................yes
      IWMMXT support..............no
      OpenGL support..............yes
      OpenVG support..............no
      OpenSSL support.............no
      QtDBus support..............no
      QtXmlPatterns support.......yes
      Phonon support..............yes
      QtMultimedia support........yes
      WebKit support..............yes
      Declarative support.........yes
      Declarative debugging.......yes
      QtScript support............yes
      QtScriptTools support.......yes
      Graphics System.............raster
      Qt3 compatibility...........yes

      Third Party Libraries:
      ZLIB support............qt
      GIF support.............plugin
      TIFF support............plugin
      JPEG support............plugin
      PNG support.............yes
      MNG support.............plugin
      FreeType support........no

      Styles:
      Windows.................yes
      Windows XP..............yes
      Windows Vista...........yes
      Plastique...............yes
      Cleanlooks..............yes
      Motif...................yes
      CDE.....................yes
      Windows CE..............no
      Windows Mobile..........no
      S60.....................no

      Sql Drivers:
      ODBC....................no
      MySQL...................no
      OCI.....................no
      PostgreSQL..............no
      TDS.....................no
      DB2.....................no
      SQLite..................plugin (qt)
      SQLite2.................no
      InterBase...............no

      Sources are in..............C:Qt4.7.2-vc
      Build is done in............C:Qt4.7.2-vc
      Install prefix..............C:Qt4.7.2-vc
      Headers installed to........C:Qt4.7.2-vcinclude
      Libraries installed to......C:Qt4.7.2-vclib
      Plugins installed to........C:Qt4.7.2-vcplugins
      Imports installed to........C:Qt4.7.2-vcimports
      Binaries installed to.......C:Qt4.7.2-vcbin
      Docs installed to...........C:Qt4.7.2-vcdoc
      Data installed to...........C:Qt4.7.2-vc
      Translations installed to...C:Qt4.7.2-vctranslations
      Examples installed to.......C:Qt4.7.2-vcexamples
      Demos installed to..........C:Qt4.7.2-vcdemos

      Running syncqt...
      Creating qmake...

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

      Creating makefiles in src...
      Generating Visual Studio project files...
      execute: Unknown error
      (-nodepend)
      (-tp)
      (vc)
      (-r)
      (C:/Qt/4.7.2-vc/projects.pro)
      (-o)
      (C:/Qt/4.7.2-vc)
      Qmake failed, return code -1

      Generating Makefiles...
      execute: Unknown error
      (-r)
      (C:/Qt/4.7.2-vc/projects.pro)
      (-o)
      (C:/Qt/4.7.2-vc)
      Qmake failed, return code -1

      C:Qt4.7.2-vc>@

      1 Reply Last reply
      0
      • L Offline
        L Offline
        ludde
        wrote on last edited by
        #14

        Since you seem to be getting different errors each time, maybe using a shadow build (see "this page":http://doc.qt.nokia.com/main-snapshot/shadow-builds-wince.html) would help - just to make sure you are building from scratch every time you start building. (Shadow building works for for Windows too, not just Windows CE, but you have to use the '-nomake examples' configure option with Qt 4.7.3.) Alternatively, you could run 'nmake distclean' to clean things up, but I don't know if you can be 100% sure that it really does clean everything.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          THSQT
          wrote on last edited by
          #15

          I always have the same error:

          c:\qt\4.7.2\include\qtcore../../src/corelib/global/qt_windows.h(63) : fatal err
          or C1083: Cannot open include file: 'windows.h': No such file or directory
          NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0
          VC\BIN\cl.EXE"' : return code '0x2'
          Stop.
          Building qmake failed, return code 2

          I've followed agent8261 instructions up to step 11

          1: I uninstalled all the QT binaries.

          2: I deleted the Qt folder.

          3: I downloaded the Visual Studio Add-in [qt.nokia.com]

          4: I installed the visual studio add-in

          5: I downloaded the Qt source code [get.qt.nokia.com]

          6: I created New folders c:\Qt\4.7.2-vc\ and extracted the source code to it.

          7: I set the environment variables:

          QTDIR = C:\Qt\4.7.2-vc\

          QMAKESPEC = win32-msvc2010

          8: I added to the Path variable:

          cd C:\Qt\4.7.2-vc\bin

          !!Check!!
          If you set it up like I did, then you should be able to do:

          C:\Qt\4.7.2-vc\configure.exe -help

          from the windows cmd prompt.

          9: I downloaded the lasts version of “jom”: ftp://ftp.qt.nokia.com/jom/

          10: I created the folder C:\Qt\4.7.2-vc\jom extracted the jom files to it

          11: I restarted windows then opened the VISUAL STUDIO command prompt and ran

          C:
          cd C:\Qt\4.7.2-vc
          configure -debug-and-release -opensource -platform win32-msvc2010

          What can I do????????
          Thanks

          1 Reply Last reply
          0
          • S Offline
            S Offline
            steno
            wrote on last edited by
            #16

            [quote author="muntoo" date="1304471289"]I've installed the Visual Studio 2010 Add-in. I'm still not sure whether I have to compile the source code, or if any of the installers will work with Visual Studio 2010.[/quote]

            The vs2008 installer works fine for me on vs2010. I don't ever build from source with the installers...

            1 Reply Last reply
            0
            • ? Offline
              ? Offline
              A Former User
              wrote on last edited by
              #17

              I had the same problem yesterday when trying to build Qt 4.7.4 with VS2008, and I remember having this problem in the past with earlier versions too.

              I then started Windows in Safe Mode and started compilation. It succeeded.

              Apparently, Microsoft compiler is more stable in safe mode.

              Jean

              1 Reply Last reply
              0
              • ? Offline
                ? Offline
                A Former User
                wrote on last edited by
                #18

                [quote author="muntoo" date="1305411723"]
                Creating makefiles in src...
                Generating Visual Studio project files...
                execute: Unknown error
                (-nodepend)
                (-tp)
                (vc)
                (-r)
                (C:/Qt/4.7.2-vc/projects.pro)
                (-o)
                (C:/Qt/4.7.2-vc)
                Qmake failed, return code -1
                [/quote]
                It seems that you use wrong target architecture. For example, you may use "Visual Studio x64 command prompt" instead x86.

                1 Reply Last reply
                0
                • ? Offline
                  ? Offline
                  A Former User
                  wrote on last edited by
                  #19

                  Hi I have the same problem with windows 64 and Qt4.8 .
                  nmake falls in a warning loop after many time .

                  1 Reply Last reply
                  0
                  • B Offline
                    B Offline
                    Bob.Capton
                    wrote on last edited by
                    #20

                    when i run the command:
                    configure -debug-and-release -opensource -platform win32-msvc2010
                    i get an error which says windows.h files.
                    I've however installed the windows SDK but it's still giving me the error.
                    Please i need help

                    1 Reply Last reply
                    0
                    • ? Offline
                      ? Offline
                      A Former User
                      wrote on last edited by
                      #21

                      Hi,

                      I am not aware of entire previous discussions but I think probable answer to your question about windows.h file might be ..

                      You have to set some environmental system variables.
                      I am using cl compiler and SDK and it works fine for me. I have the following environmental variables set..

                      Variable name : INCLUDE
                      Variable value : C:\Program Files\Microsoft Visual Studio\VC98\atl\include;C:\Program Files\Microsoft Visual Studio\VC98\mfc\include;C:\Program Files\Microsoft Visual Studio\VC98\include;C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include;C:\Program Files\Microsoft Visual Studio 9.0\VC\include;C:\OpenSSL-Win32\include;C:\OpenSSL-Win32\include\openssl;

                      I am using cl from Visual studio command prompt. I am not aware of any settings to be done for Visual studio debugger. This link might help you :
                      http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/c42cf8da-8718-4aa7-9a6a-9eef80f96c6e

                      1 Reply Last reply
                      0
                      • W Offline
                        W Offline
                        weiyuemin
                        wrote on last edited by
                        #22

                        I have the same issue with muntoo, while building the current stable branch (5.1) from git.

                        NMAKE : fatal error U1077: '"C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\m
                        t.exe"' : return code '0x1f'

                        Carefully reading http://qt-project.org/wiki/Building_Qt_5_from_Git , I guess it is because lack of Windows SDK 7.1.

                        But I failed to install Windows SDK 7.1. According to the page http://qt-project.org/wiki/Cannot_Install_Windows_SDK, I uninstalled the Microsoft Visual C++ 2010 Redistributable, but still failed with another error.

                        1 Reply Last reply
                        0
                        • ? Offline
                          ? Offline
                          A Former User
                          wrote on last edited by
                          #23

                          Hi,

                            Try to use jom instead of nmake that may solve your problem...
                          

                          Refer to ...: http://qt-project.org/forums/viewthread/25776

                          1 Reply Last reply
                          0
                          • W Offline
                            W Offline
                            weiyuemin
                            wrote on last edited by
                            #24

                            At that time, I had other errors when using jom, posted at http://qt-project.org/forums/viewthread/26325 Afterwards I find another machine that can install Windows SDK and run nmake, then build successfully.

                            jom may indeed avoid the problem. In fact, I participate in your referred post http://qt-project.org/forums/viewthread/25776 :)

                            1 Reply Last reply
                            0
                            • ? Offline
                              ? Offline
                              A Former User
                              wrote on last edited by
                              #25

                              Sorry did not see that you were the one who posted the solution in the other post...
                              Just thought that it might be relevant and referred it. :-)

                              1 Reply Last reply
                              0
                              • F Offline
                                F Offline
                                flafi1
                                wrote on last edited by
                                #26

                                try with http://thomasstockx.blogspot.com/2011/03/qt-472-in-visual-studio-2010.html

                                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