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. Qt in Visual Studio 2012
QtWS25 Last Chance

Qt in Visual Studio 2012

Scheduled Pinned Locked Moved Installation and Deployment
26 Posts 8 Posters 29.0k 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.
  • M Offline
    M Offline
    mulfycrowh
    wrote on 17 Feb 2013, 11:17 last edited by
    #7

    I installed Active Perl 64 bits and Python (x86 and x64), launched nmake and about one hour later I got 5 fatal errors that are U1077 'cd' : return code 0x2.

    I guess that I am facing big trouble. Am I not ?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mulfycrowh
      wrote on 17 Feb 2013, 14:45 last edited by
      #8

      At the end I can read :

      'python' is not recognized as an internal or external command.
      Then first error U1077 'python' return code 0x01
      Then second error about nmake.exe return code 0x02
      Then third, fourth and fifth errors return code 0x02

      1 Reply Last reply
      0
      • C Offline
        C Offline
        Chris Kawa
        Lifetime Qt Champion
        wrote on 17 Feb 2013, 20:09 last edited by
        #9

        You need to add perl and python to your PATH. Either by setting it globally in the system settings or for this session in the command line before you run nmake:
        @
        set PATH=%PATH%;C:\PathToPerl;C:\PathToPython
        @
        The good news is you don't need to restrat from scratch. If you get that error fix your PATH and type nmake again, it will pick up where it sopped.

        1 Reply Last reply
        0
        • J Offline
          J Offline
          JKSH
          Moderators
          wrote on 17 Feb 2013, 23:08 last edited by
          #10

          Hmm.. the ActivePerl and ActivePython installers should have updated the system PATH automatically. Try restarting your computer first; Windows won't see the updated PATH otherwise

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

          1 Reply Last reply
          0
          • C Offline
            C Offline
            Chris Kawa
            Lifetime Qt Champion
            wrote on 17 Feb 2013, 23:16 last edited by
            #11

            [quote author="JKSH" date="1361142534"]Try restarting your computer first; Windows won't see the updated PATH otherwise[/quote]
            That's actually no longer true starting from (I think)Vista. Win7/8 for sure. Just re-open a console and you're good to go.
            I might be wrong, but from what I recall installers ask you if you want them to update your PATH and at least for one of them it was not the default.
            Personally, if I can, I try not to pollute the global PATH and just include what I need on a per console session basis. All sort of crazy errors occur when there are conflicting things there (eg. git on windows is a very naughty piece of software).

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mulfycrowh
              wrote on 20 Feb 2013, 10:27 last edited by
              #12

              Guys and girls I would like to thank you because it runs !

              On Windows 7 :

              I downloaded Perl and Python 32 bits then the Qt source version 5.0
              I created a folder C:\Qt\5.0.1 and put the zip file on it.
              Unzipped it.

              Before starting the configuration you have to set your environmental variables to tell the system where you put Perl and Python. So :
              Start > Right Click on Computer icon > Properties > Advanced System Settings > Advanced > Environment Variables > System Variables.
              Select the variable "Path" and select "Edit". Do not delete what is written in this variable and add ";" (if not present) C:\Path to Perl.exe add another ";" C:\Path to Python.exe
              Save and quit the dialog box.

              Then Start > Microsoft Visual Studio 2012 > Visual Studio Tools > Open VS2012 x64 Native Tools Command Prompt
              First of all you have to change your folder with the command :
              cd C:\Qt\5.0.1\qt-everywhere-opensource-src-5.0.1
              Then type :
              SET CL=/MP
              Then type :
              configure -developer-build -opensource -opengl desktop (-nomake tests -nomake examples)
              The ones in brackets are optional - do not type in the brackets.
              You should accept the license by entering "y".
              After a while (2-3 minutes) type in:
              qmake
              It takes a very long time : about 3 hours (i7 - 2670QM@2,2 GHz).

              Then browse to Qt Project Website > Other Downloads and download Visual Studio Add-in 1.2.0 for Qt5 and run it.

              Launch Visual Studio 2012. You should see Qt5 on the main bar. Select it and go to "Qt Options" > Add and enter a name for the version name and enter the path where you have qmake.exe (you should find it in the folder "bin". Save your selection.

              You're now ready starting using Qt in VS 2012 !

              That's All Folks !

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mulfycrowh
                wrote on 20 Feb 2013, 16:04 last edited by
                #13

                Now tre trouble comes when I want to compile a Qt Project.
                I've got a linkage error LNK 1112.
                This is a conflict between 32 and 64 bits.

                How can I manage it ?

                Thanks

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mulfycrowh
                  wrote on 20 Feb 2013, 17:14 last edited by
                  #14

                  I solved the issue by using VS 2012 x86 Native Tools Command Prompt instead.

                  1 Reply Last reply
                  0
                  • O Offline
                    O Offline
                    Olorin5800
                    wrote on 21 Feb 2013, 09:09 last edited by
                    #15

                    Consider adding [SOLVED] in the post title


                    My programs never have bugs, they just develop random features.

                    1 Reply Last reply
                    0
                    • N Offline
                      N Offline
                      Neptun
                      wrote on 17 Mar 2013, 12:47 last edited by
                      #16

                      I checked this today, works fine for Windows 7 x64 Ultimate with VS 2012 x64 Ultimate. There is a small mistake in last point "After a while (2-3 minutes) type in: qmake" command prompt returned "no such command" and I had to use "nmake". Another tip :D form "http://qt-project.org/wiki/Building_Qt_Desktop_for_Windows_with_MSVC" after finishing build of all files run @nmake clean
                      cd qttranslations
                      nmake@

                      1 Reply Last reply
                      0
                      • D Offline
                        D Offline
                        daniel347x
                        wrote on 5 Apr 2013, 23:00 last edited by
                        #17

                        I'd like to suggest that these notes be formalized and displayed prominently in an article linked on the home page. I am a newcomer to Qt, but I am an experienced C++ programmer and I use VS 2012.

                        It seems to me that integration instructions for Microsoft's current development environment, as of April 2013, might rightfully be considered of paramount importance in terms of a "getting started on Windows" guide.

                        That way, a user who wishes to integrate Qt with Microsoft's most current IDE will not have to dig through forum postings, as I have had to do.

                        Thanks,
                        Dan

                        1 Reply Last reply
                        0
                        • J Offline
                          J Offline
                          Jemar
                          wrote on 9 Apr 2013, 04:29 last edited by
                          #18

                          Hey guys. I've been working on a community wiki on stackoverflow for this exact problem. It's certainly not perfect and I think needs some work from people who know more than I, but it's a start: http://stackoverflow.com/questions/15826893/getting-qt5-to-install-and-work-with-visual-studio-2012/15893226#15893226

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            daniel347x
                            wrote on 10 Apr 2013, 17:55 last edited by
                            #19

                            I have carefully followed the steps to build Qt on Windows 7 64-bit (but building Qt in 32-bit mode) in the linked StackOverflow Community Wiki (see previous comment for link), but I cannot overcome the following error while running nmake:

                            "c1xx : fatal error C1083: Cannot open source file: '.rcc\debug_shared\qrc_mimetypes.cpp': No such file or directory."

                            (And, indeed, there is no "qrc_mimetypes.cpp" file anywhere in my Qt folder or its subfolders.)

                            I have posted a new StackOverflow question here: http://stackoverflow.com/questions/15932767/missing-qrc-mimetypes-cpp-while-attempting-to-build-qt-on-windows-7-32-bit-bu

                            Any help would be appreciated. It seems that building Qt on Windows is not straightforward, even when following all directions with meticulous care. Thanks!

                            1 Reply Last reply
                            0
                            • D Offline
                              D Offline
                              daniel347x
                              wrote on 11 Apr 2013, 10:42 last edited by
                              #20

                              I have resolved the problem to be a catastrophic bug with the Avast! antivirus sandbox. Only a complete uninstallation of Avast! suffices; as long as Avast! remains installed on the system, it is impossible under any circumstances to build Qt.

                              See http://stackoverflow.com/q/15932767/368896.

                              1 Reply Last reply
                              0
                              • J Offline
                                J Offline
                                JKSH
                                Moderators
                                wrote on 11 Apr 2013, 10:47 last edited by
                                #21

                                If it's a bug with Avast's sandboxing engine, then it needs to be fixed as it will probably frustrate many other users in the meantime. Please notify the Avast developers.

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

                                1 Reply Last reply
                                0
                                • D Offline
                                  D Offline
                                  daniel347x
                                  wrote on 11 Apr 2013, 10:54 last edited by
                                  #22

                                  I have already alerted Avast. I sent them a detailed email this morning. Frankly, I suspect that their company (with 200,000,000 users) is now too top-heavy to care.

                                  I will report here if and when they respond.

                                  1 Reply Last reply
                                  0
                                  • J Offline
                                    J Offline
                                    JKSH
                                    Moderators
                                    wrote on 11 Apr 2013, 11:15 last edited by
                                    #23

                                    Great, thanks for your efforts :) Fingers crossed that they remember how they grew popular in the first place

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

                                    1 Reply Last reply
                                    0
                                    • D Offline
                                      D Offline
                                      daniel347x
                                      wrote on 12 Apr 2013, 15:31 last edited by
                                      #24

                                      Another VS2012 build issue, involving ICU support.

                                      When ICU is enabled ("-icu" on the configure command line, along with a proper build of ICU in VS2012 and proper inclusion of all ICU paths (header, .lib, and .dll)), Line 688 of "qtbase\src\corelib\codecs\qtextcodec.cpp" returns a NULL codec (ICU fails to return a codec) when asked for a codec whose name is "US-ASCII".

                                      Later, this NULL codec variable is dereferenced by the "lrelease.exe" utility when it attempts to perform a translation during the Qt build, which crashes lrelease.exe and causes the Qt build to stop with an error.

                                      It therefore seems to be impossible to include ICU support with a VS2012-compiler 32-bit build of Qt5.

                                      Might someone possibly be able to confirm and/or look into this?

                                      1 Reply Last reply
                                      0
                                      • D Offline
                                        D Offline
                                        daniel347x
                                        wrote on 12 Apr 2013, 15:45 last edited by
                                        #25

                                        I have posted this question to StackOverflow: http://stackoverflow.com/questions/15975608/icu-support-in-a-32-bit-build-of-qt5-with-the-vs2012-compiler-causes-qt5-build-f

                                        1 Reply Last reply
                                        0
                                        • D Offline
                                          D Offline
                                          daniel347x
                                          wrote on 12 Apr 2013, 16:04 last edited by
                                          #26

                                          Note the further, related issue that this means that Webkit cannot be built for VS2012, either, since Webkit requires an ICU build of Qt.

                                          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