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] Qt 5.2.1 for Windows 64-bit VS 2012. Can't compile a project
QtWS25 Last Chance

[SOLVED] Qt 5.2.1 for Windows 64-bit VS 2012. Can't compile a project

Scheduled Pinned Locked Moved Installation and Deployment
20 Posts 7 Posters 16.1k 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.
  • F Offline
    F Offline
    Fuzzy Barsik
    wrote on last edited by
    #1

    Hello all!
    I'm complete newbie, so, please, don't judge strictly and forgive me my ignorance. I hope I read all threads about Qt installation, but still have no a clue on how to resolve my issue...

    1. I downloaded and installed Visual Studio Express 2012
    2. I downloaded and installed Qt 5.2.1 for Windows (ANGLES) 64-bit MSVC 2012
      My Qt config now looks like the following:
      http://i051.radikal.ru/1402/4b/8f8885219347.jpg
      http://s018.radikal.ru/i511/1402/ca/fa3ffe66e8ee.jpg
      http://s61.radikal.ru/i171/1402/eb/08d9136d1298.jpg
      http://i017.radikal.ru/1402/8f/c3b22a3fb175.jpg

    As we can see, there is no any debugger installed, and the Kit shows warning triangle. When I'm trying to compile a project (it took ages until I figured that Qt doesn't recognize spaces in names, including folders' names), I get the following error: 'cl' is not recognized as an internal or external command, operable program or batch file. The building process hangs, and I remain empty handed...

    I would appreciate if someone could point me the proper direction how to resolve my issue.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jediengineer
      wrote on last edited by
      #2

      I'm a newbie too, and I'm not sure how relevant this is, but when I installed Qt for the first time, I downloaded the wrong version, and I got the same message under the "kits" tab as you. It turned out that I had downloaded the MSVC version of Qt instead of the MinGW version. I'd suggest that you check that Visual Studio 2012 Express is a 64 bit version, and if it is, make sure that the Express version is compatible with Qt. It may not be, and that might be the root of the problem.

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        zibicoder
        wrote on last edited by
        #3

        For be able to debugging you need windows SDK installed on jour machine, minimum is debuggers. Try search this forum for more details, it is frequently asked question.

        1 Reply Last reply
        0
        • F Offline
          F Offline
          Fuzzy Barsik
          wrote on last edited by
          #4

          Thanks for the reply zibicoder. To the best of my knowledge, the latest Windows SDK is version 7.1 released in May 2010 (http://www.microsoft.com/en-us/download/details.aspx?id=8279) and hence is compatible with Visual Studio 2005, 2008 and 2010, while I need a solution for VS2012. Please, correct me if I misunderstand something and/or point me to a link to a newer Windows SDK release.

          P.S. What is more, it is said that Visual Studio 2012 Express for Windows Desktop comes with the Windows 8.0 SDK included (https://developer.mozilla.org/en-US/docs/Windows_SDK_versions). Therefore, I probably just need some guidlines on how to configure it properly...

          1 Reply Last reply
          0
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            [quote author="zibicoder" date="1392237696"]For be able to debugging you need windows SDK installed on jour machine, minimum is debuggers.[/quote]No, you need to install "Debugging Tools for Windows". Then, the warning triangle should go away.

            [quote author="Fuzzy Barsik" date="1392239080"]P.S. What is more, it is said that Visual Studio 2012 Express for Windows Desktop comes with the Windows 8.0 SDK included[/quote]Correct. After you install MSVC 2012, you will automatically have Windows SDK 8.

            In the "Compilers" tab, click on "Microsoft Visual C++ Compiler 11.0 (amd64)". That should cause more information to appear at the bottom of the window. Can you post a screenshot of that?

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

            1 Reply Last reply
            0
            • F Offline
              F Offline
              Fuzzy Barsik
              wrote on last edited by
              #6

              Hi JKSH, thanks for the clarification!
              I guess, you and zibicoder are both correct: I downloaded SDK 8.0 from Windows SDK archive (http://msdn.microsoft.com/en-us/windows/desktop/ff851942.aspx) and selected only the Debugging Tools for Windows checkbox during the istallation, as described here:
              http://msdn.microsoft.com/en-us/library/windows/hardware/ff551063(v=vs.85).aspx

              Now I have the Debuggers folder under C:\Program Files (x86)\Windows Kits\8.0, warning in Kits tab disappeared and debuggers were autodetected by Qt:
              http://s017.radikal.ru/i414/1402/2c/9fb620eaf5ef.jpg
              http://s020.radikal.ru/i715/1402/72/715a27038aa2.jpg

              However, it did not resolve my issue with building a project, and I still get the same error message: http://s017.radikal.ru/i428/1402/97/79891a669488.jpg

              Here is the screenshot with amd64 Compiler selected:
              http://i074.radikal.ru/1402/2f/cd04c43db647.jpg

              1 Reply Last reply
              0
              • F Offline
                F Offline
                Fuzzy Barsik
                wrote on last edited by
                #7

                OK, I searched Qt Forums for "‘cl’ is not recognized as an internal or external command, operable program or batch file" and found out that I'm not alone. General comments on the issue - some paths are missing. Found cl.exe and added "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64" to the PATH variable. After that got the next error: "The program can't start because mspdb110.dll is missing from your computer. Try reinstalling the program to fix this problem".

                Searched Qt Forums for 'mspdb110.dll' error, found a thread with the same recommendations, located mspdb110.dll, added "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE" to the PATH, got "C1083: Cannot open include file: 'stddef.h': No such file or directory C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\include\QtCore\qglobal.h".

                In this case locating stddef.h and adding "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include" to the PATH didn't bring any result. Then I just copied stddef.h and pasted it into "C:\Qt\Qt5.2.1\5.2.1\msvc2012_64\include\QtCore" - got the next C1083 error: crtdefs.h is missing. Copying it into "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include" yielded the next C1083 error: sal.h is missing. Um-m-m... Am I on the right track?

                I also found "this recommendation":https://qt-project.org/forums/viewthread/23977/#111883 on the same "'cl' is not recognized" issue, but completely unclear if the workaround with manually created vcvars64.bat is still valid for VS 2012 (I have vcvarsx86_amd64.bat in "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64" folder, and it's obviously not empty...)

                1 Reply Last reply
                0
                • F Offline
                  F Offline
                  Fuzzy Barsik
                  wrote on last edited by
                  #8

                  Solution so far ("THANKS to Yuri Krugloff":http://forum.tver-soft.org/index.php/topic,852.msg913.html#msg913):

                  1. Create empty start.cmd file
                  2. Add the following code into it
                    @call "c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_amd64\vcvarsx86_amd64.bat"
                    start "" "c:\Qt\Qt5.2.1\Tools\QtCreator\bin\qtcreator.exe"@
                  3. Run start.cmd
                  4. (Optionally) Enjoy
                  1 Reply Last reply
                  0
                  • JKSHJ Offline
                    JKSHJ Offline
                    JKSH
                    Moderators
                    wrote on last edited by
                    #9

                    Thank you for sharing your solution!

                    I'm still puzzled though -- Qt Creator should have called VCVARSALL automatically. If you go to Tools -> Options -> Build & Run -> Compilers and click on your MSVC compiler(s), do you see VCVARSALL in "Initialization"?

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

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      Fuzzy Barsik
                      wrote on last edited by
                      #10

                      Yes, I do (see screenshot in "my comment above":http://qt-project.org/forums/viewreply/162482/)...

                      1 Reply Last reply
                      0
                      • JKSHJ Offline
                        JKSHJ Offline
                        JKSH
                        Moderators
                        wrote on last edited by
                        #11

                        [quote author="Fuzzy Barsik" date="1392907503"]Yes, I do (see screenshot in "my comment above":http://qt-project.org/forums/viewreply/162482/)...[/quote]Ah yes, you already posted it before. Sorry, I forgot about it.

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

                        1 Reply Last reply
                        0
                        • AnatolySA Offline
                          AnatolySA Offline
                          AnatolyS
                          wrote on last edited by
                          #12

                          Fuzzy Barsik, unfortunately you posted workaround, not solution, because qt creator in normal condition must call vcvarsall.cmd itself.

                          The same problem described here http://qt-project.org/forums/viewthread/32276/#163680

                          I reported bug https://bugreports.qt-project.org/browse/QTCREATORBUG-11539

                          1 Reply Last reply
                          0
                          • AnatolySA Offline
                            AnatolySA Offline
                            AnatolyS
                            wrote on last edited by
                            #13

                            [quote author="Fuzzy Barsik" date="1392641564"][/quote]

                            I found one moment that may became cause of the problem. This is profile name. On my work machine where qt creator works as expected I have latin profile name (APPDATA=C:\Users\Stranger\AppData\Roaming), but on home machine there is cyrillic profile name (APPDATA=C:\Users\Толик\AppData\Roaming)

                            What about your profile name?

                            1 Reply Last reply
                            0
                            • F Offline
                              F Offline
                              Fuzzy Barsik
                              wrote on last edited by
                              #14

                              Hi AnatolyS,
                              My Windows profile name is in cyrillic.

                              1 Reply Last reply
                              0
                              • AnatolySA Offline
                                AnatolySA Offline
                                AnatolyS
                                wrote on last edited by
                                #15

                                [quote author="Fuzzy Barsik" date="1393149575"]Hi AnatolyS,
                                My Windows profile name is in cyrillic.[/quote]

                                It seems this is only difference that I can observe beetween problem and work environments.

                                1 Reply Last reply
                                0
                                • A Offline
                                  A Offline
                                  asergiu
                                  wrote on last edited by
                                  #16

                                  In fact the CL not in path problem has been solved in my case by installing the Windows 7 SDK (I only selected a part of the components - excluded .NET cause I don't need it)

                                  I mention that I already had the Visual Studio 2010 installed at the point when the error appeared. Together with the Windows SDK came a new compiler that solved the problem - and as a bonus I have now also the Windows Debugging Tools

                                  1 Reply Last reply
                                  0
                                  • AnatolySA Offline
                                    AnatolySA Offline
                                    AnatolyS
                                    wrote on last edited by
                                    #17

                                    [quote author="asergiu" date="1394798550"]In fact the CL not in path problem has been solved in my case by installing the Windows 7 SDK (I only selected a part of the components - excluded .NET cause I don't need it)
                                    [/quote]

                                    If you have several toolchains, it does not help. Qt Creator must call appropriate vcvarsall.bat itself according to current project kit. That's the problem.

                                    1 Reply Last reply
                                    0
                                    • JKSHJ Offline
                                      JKSHJ Offline
                                      JKSH
                                      Moderators
                                      wrote on last edited by
                                      #18

                                      I'm not sure if this helps or not:

                                      I uninstalled some old versions of SQL Server, and that broke my MSVC installation -- Qt Creator can auto-detect MSVC, but gave me “‘cl’ is not recognized as an internal or external command, operable program or batch file”.

                                      It was fixed when I ran the MSVC installer to repair it.

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

                                      1 Reply Last reply
                                      0
                                      • AnatolySA Offline
                                        AnatolySA Offline
                                        AnatolyS
                                        wrote on last edited by
                                        #19

                                        Daniel Teske has found workaround: https://bugreports.qt-project.org/browse/QTCREATORBUG-11539

                                        You should redirect TMP to path without non-latin characters. That works fine.

                                        D 1 Reply Last reply
                                        0
                                        • AnatolySA AnatolyS

                                          Daniel Teske has found workaround: https://bugreports.qt-project.org/browse/QTCREATORBUG-11539

                                          You should redirect TMP to path without non-latin characters. That works fine.

                                          D Offline
                                          D Offline
                                          danieldil
                                          wrote on last edited by
                                          #20

                                          @AnatolyS I tried that, nothing changed.

                                          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