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. Please help compile Qt5 with visual c++ 2010 express

Please help compile Qt5 with visual c++ 2010 express

Scheduled Pinned Locked Moved Installation and Deployment
9 Posts 4 Posters 5.1k 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.
  • B Offline
    B Offline
    bnlqtfan
    wrote on last edited by
    #1

    Hi,

    I am newcomer of Qt. I want to install Qt 5. Because I have both vista and win7 computers, I prefer to use visual c++ 2010 express. It seems that I need to compile Qt 5 from source.

    I saw there are discussions both in this forum or other places about compile qt 5. However, none of them gives a detailed FULL guidance. Can anybody give me a hand?

    Thanks,
    QtFan

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

      Hi,

      You don't NEED to compile it yourself; you can download the pre-compiled packages at http://qt-project.org/downloads

      But if you want to compile your own, full instructions are at http://qt-project.org/wiki/Building_Qt_5_from_Git

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

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bnlqtfan
        wrote on last edited by
        #3

        Thanks, JKSH. The pre-compiled version is for VS 2010, not Express edition. It is my understanding that, if one wants to integrate 3rd party widget into Qt Creator, the widget has to be compiled using the same compiler as QT was compiled with. If I don't have VS 2010 (I don't want to re-invest in it as I try to became a Qt fan), I won't be able to use 3rd party widget, e.g. Qwt. Am I right?

        By the way, I followed the link in the post above except that I downloaded the source code from (http://releases.qt-project.org/qt5/5.0.1/single/qt-everywhere-opensource-src-5.0.1.zip) instead of using git. However, when I type "configure -debug-and-release ...", I got the following error:

        Unrecognized character \xFF; marked by <-- HERE after <-- HERE near column 1 at
        C:\Qt\5.0.1\configure line 1.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          Hi,

          the difference between MSVS 2010 and 2010 express is just the set of features, not the compiler.
          The compiler part is the same for both versions, and is also part of the corresponding Windows SDK version, so you can use the compiler without having a MS VS installed.

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • G Offline
            G Offline
            ginovh
            wrote on last edited by
            #5

            I also get the same error message:
            Unrecognized character \xFF; marked by <— HERE after <— HERE near column 1 at
            C:\Qt\5.0.1\configure line 1.

            But for sure there is something wrong with the configure file in the top directory. In the qt-everywhere-opensource-src-5.0.1.zip it is 49K and, this is actually a jpg file! ( rename it to configure.jpg and open it in explorer and you will see a flower! )
            So if you do

            perl configure
            , no wonder you get the above error.

            In qt-everywhere-opensource-src-5.0.1.tar.gz you have a 3.35Kb text perl script. But also this didn't work. I got errors about qmake not found later on. If I copied qmake from an earlier release it failed later doing the nmake.

            So obviously the windows source package does not work. The flower picture is very strange. Did nobody else noticed this?

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

              [quote author="ginovh" date="1364854329"]But for sure there is something wrong with the configure file in the top directory. In the qt-everywhere-opensource-src-5.0.1.zip it is 49K and, this is actually a jpg file! ( rename it to configure.jpg and open it in explorer and you will see a flower! )[/quote]Qt advocates beautiful code ;)

              [quote]So if you do

              perl configure
              , no wonder you get the above error.[/quote]-`configure' is a shell script BTW, not a Perl script-
              Edit: The source code packages do contain a 'configure' Perl script

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

              1 Reply Last reply
              0
              • G Offline
                G Offline
                ginovh
                wrote on last edited by
                #7

                `configure’ is a shell script BTW, not a Perl script
                This I don't understand. Yes, it is a shell script on linux because it starts with
                #!/usr/bin/perl ( well in the tar.gz file, not in the zip file) But why would you want to execute a linux shell script on windows?
                And then why does the the configure.bat call perl with configure as an argument ?
                Anyway even as a shell script it is plain wrong. A jpg file is not a shell script.

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

                  [quote author="ginovh" date="1364882310"]`configure’ is a shell script BTW, not a Perl script
                  This I don't understand. Yes, it is a shell script on linux because it starts with
                  #!/usr/bin/perl ( well in the tar.gz file, not in the zip file) But why would you want to execute a linux shell script on windows?
                  And then why does the the configure.bat call perl with configure as an argument ?
                  Anyway even as a shell script it is plain wrong. A jpg file is not a shell script.[/quote]Sorry, my bad... the tar.gz and zip packages do come with an extra 'configure' Perl script (http://qt.gitorious.org/qtsdk/qtsdk/blobs/master/configure ); I was thinking of the 'configure' shell script inside the /qtbase/ folder (http://qt.gitorious.org/qt/qtbase/blobs/stable/configure )

                  I assumed that you were playing an April Fool's joke with the flower. But if you weren't, something's seriously wrong with the package you downloaded; the 'configure' should be the same in both the tar.gz and the zip packages.

                  You can't use a qmake that has been compiled for older versions, but replacing 'configure' with the Perl script from the tar.gz should work. If not, post the error message here along with your system specs (OS, Perl version, Python version, compiler version) and we'll try to help you

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

                  1 Reply Last reply
                  0
                  • G Offline
                    G Offline
                    ginovh
                    wrote on last edited by
                    #9

                    Unfortunately it was no April Fool's joke. ( I thought later it was a bad idea to post such crazy thing --a configure file becoming a flower jpg -- in the forum on 1st April. )
                    Actually I am suprised nobody noticed this. Don't they have regression tests to actually build Qt from these packages?

                    Just replacing the configure script gets me a little bit further, but it fails later on, because it doesn't find qmake binary.
                    'J:/Qt/qt-everywhere-opensource-src-5.0.1/qtbase/bin/qmake' is not recognized as an internal or exte
                    rnal command, operable program or batch file.

                    I found to build qmake.exe I needed to edit qtbase/configure.bat and comment out this line like this
                    ::if not exist %QTSRC%.gitignore goto sconf
                    This builds qmake.exe and puts it in bin directory. I am building now, curious how far I get ...

                    But something is wrong with this source package. (also qtbase/configure.exe is some placeholder as it is a .png file of an arrow picture. It gets overwritten after building qmake.exe somehow. I think this all is not nice and confusing.)

                    Update: configure is ok now. Doing nmake after some time gets me this error:
                    qsimd.obj : error LNK2019: unresolved external symbol ___cpuidex referenced in f
                    unction "void __cdecl cpuidFeatures07_00(unsigned int &)" (?cpuidFeatures07_00@@
                    YAXAAI@Z)
                    ....\lib\Qt5Cored.dll : fatal error LNK1120: 1 unresolved externals

                    Any idea?

                    Specs :
                    perl 5.16.3
                    python 2.7.2.5
                    Ruby 2.0.0
                    Qt sources 5.0.1
                    msvc 2008 standard
                    Win vista

                    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