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. Building Qt 5.2.1 in latest Visual Studios
Forum Updated to NodeBB v4.3 + New Features

Building Qt 5.2.1 in latest Visual Studios

Scheduled Pinned Locked Moved Installation and Deployment
39 Posts 4 Posters 12.8k 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.
  • M Offline
    M Offline
    mwpowellhtx
    wrote on last edited by
    #22

    Ah, I didn't need to change dir to qtbase, there is no Makefile there. Actually it's in the <path/to/qt5>.

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mwpowellhtx
      wrote on last edited by
      #23

      Configure done. Now jom is running. Coffee, movie...

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mwpowellhtx
        wrote on last edited by
        #24

        I'd agree with the installer approach if I was the only end-user. We're supporting software across platforms, so need the flexibility to build it how we want across platforms.

        I'm not sure how long the build runs (2 cores, 1 hour?), or if JOM is actually helping at all. At least it's building. We'll see...

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mwpowellhtx
          wrote on last edited by
          #25

          Actually, the build was finishing just as I wrote that...

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mwpowellhtx
            wrote on last edited by
            #26

            So... ~50 minutes, give or take. JOM helped a little? More cores, maybe a non factor. Not sure if I set the CL to /MP, now that I think about it. I'm sure it could be helped.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mwpowellhtx
              wrote on last edited by
              #27

              Okay, now what? I've got some includes to include, and some cmakes in CD to make?

              Actually I see a bunch of promising output in qtbase/lib to go with the includes.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mwpowellhtx
                wrote on last edited by
                #28

                ... So really we "just" need the includes and the output from the prefix PWD/qtbase? The harder part is establishing a strategy for maintenance, end-user consumption, etc.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mwpowellhtx
                  wrote on last edited by
                  #29

                  Okay, I reconfigured, no prefix, "qtbase/lib" dropped "in place" alongside "qtbase/include". I set the CL environment variable and ran JOM; and the build that took nearly 1 hour before, took maybe 2 minutes (conservatively)! That's on an 8-core machine. I can hardly believe that. It sure does look like the DLLs and all are there. WOW,

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mwpowellhtx
                    wrote on last edited by
                    #30

                    If I could mark it as an answer I would. Thanks again for setting me straight.

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

                      Well, you don't need to build Qt for your end-users. For them, you just deploy the libraries you need ("link":http://qt-project.org/doc/qt-5/windows-deployment.html, there are guides like that for every platform). But of course, you know your situation better than I do.

                      [quote]Okay, now what? I’ve got some includes to include, and some cmakes in CD to make?[/quote]

                      That depends on what you want to achieve. If you want to use Qt Creator for development, then you just need to point it to your newly built qmake.exe, and it will configure itself automatically; no need to link or include anything by hand.

                      If you want to use Visual Studio - there is a plugin for that available on the downloads page.

                      If you want to run everything from command line, you need to add qtbase/bin to PATH.

                      [quote]So really we “just” need the includes and the output from the prefix PWD/qtbase?[/quote]

                      qtbase/bin, qtbase/includes, qtbase/mkspecs. You can automatically separate those if you perform an out of source build, like this:
                      @
                      // assuming Qt source code is in qt-src
                      mkdir qt-build
                      cd qt-build
                      ..\qt-src\configure <your Qt flags> -prefix CD\qtbase
                      nmake
                      nmake install
                      @

                      This will compile and install Qt to qt-build, leaving your Qt source code intact.

                      (Z(:^

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        mwpowellhtx
                        wrote on last edited by
                        #32

                        Right I understand re: developers and deployed binaries. The configure make system is a little foreign to me is all, and when I have used it a bit opaque if cumbersome. I'm sure not once you get used to it.

                        Anyhow, I expect there's some way to identify libs (and dlls or .sos) for linkage on the other side of their includes. Much of which is IDE specific.

                        The much harder part about our situation is mitigating cross platform risk factors, less technical and more geo-political in nature, coordinating the builds.

                        Thanks...

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

                          Yeah, cross-platform build servers are always problematic. Qt makes the compilation part quite easy (the same code works on all platforms without any changes), but there always are lots of other problems to solve ;)

                          OK, I hope I've helped you at least a bit. If there are more questions, please ask. Have fun! :)

                          (Z(:^

                          1 Reply Last reply
                          0
                          • R Offline
                            R Offline
                            robinrowe
                            wrote on last edited by
                            #34

                            I can build QT using VC++ 2013 without OpenSSL, but with OpenSSL I get the errors below.

                            Suggestions?

                            Robin

                                cl -c -FIqt_pch.h -Yuqt_pch.h -Fp.pch\debug\Qt5Networkd_pch.pch -nologo
                            

                            -Zm200 -Zc:wchar_t -Zi -MDd -GR -W3 -w34100 -w34189 /Fd....\lib\Qt5Networkd.pdb
                            -DUNICODE -DWIN32 -DQT_NO_USING_NAMESPACE -DQT_BUILD_NETWORK_LIB -DQT_BUILDING_
                            QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRI
                            NGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_US
                            E_MATH_DEFINES -DQT_NO_EXCEPTIONS -DQT_CORE_LIB -I"C:\qt\openssl-1.0.1f\openssl-
                            1.0.1f\include" -I"....\include" -I"....\include\QtNetwork" -I"....\include\Q
                            tNetwork\5.2.1" -I"....\include\QtNetwork\5.2.1\QtNetwork" -I"tmp" -I"..\3rdpar
                            ty\zlib" -I"kernel" -I"....\include\QtCore\5.2.1" -I"....\include\QtCore\5.2.1
                            \QtCore" -I"....\include\QtCore" -I".moc\debug" -I"....\mkspecs\win32-msvc2010
                            " -Fo.obj\debug\ @C:\Users\rower\AppData\Local\Temp\nm68AA.tmp
                            qhttpnetworkreply.cpp
                            C:\qt\openssl-1.0.1f\openssl-1.0.1f\include\openssl/ssl.h(1) : error C2059: synt
                            ax error : '.'
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(69) : error C2143: syntax error : missing ';' before ''
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(69) : error C4430: missing type specifier - int assumed. Note: C++ d
                            oes not support default-int
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(69) : warning C4183: 'createSsl': missing return type; assumed to be
                            a member function returning 'int'
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(70) : error C2061: syntax error : identifier 'SSL'
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(79) : error C2143: syntax error : missing ';' before '
                            '
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(79) : error C4430: missing type specifier - int assumed. Note: C++ d
                            oes not support default-int
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(80) : error C2143: syntax error : missing ';' before ''
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(80) : error C4430: missing type specifier - int assumed. Note: C++ d
                            oes not support default-int
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(81) : error C2143: syntax error : missing ';' before '
                            '
                            c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                            se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                            context_p.h(81) : error C4430: missing type specifier - int assumed. Note: C++ d
                            oes not support default-int

                            1 Reply Last reply
                            0
                            • M Offline
                              M Offline
                              mwpowellhtx
                              wrote on last edited by
                              #35

                              Research C4430? Possibly a language standard thing? I don't know the configure option(s), but could C++11 (or other) be specified?

                              1 Reply Last reply
                              0
                              • R Offline
                                R Offline
                                robinrowe
                                wrote on last edited by
                                #36

                                I configured openssl like this:

                                perl Configure VC-WIN32 --prefix=c:\Qt\openssl-1.0.1f\openssl-1.0.1f\release

                                Qt5 like this:

                                configure -prefix

                                1 Reply Last reply
                                0
                                • R Offline
                                  R Offline
                                  robinrowe
                                  wrote on last edited by
                                  #37

                                  I configured openssl like this:

                                  perl Configure VC-WIN32 --prefix=c:\Qt\openssl-1.0.1f\openssl-1.0.1f\release

                                  Qt5 like this:

                                  configure -prefix

                                  1 Reply Last reply
                                  0
                                  • R Offline
                                    R Offline
                                    robinrowe
                                    wrote on last edited by
                                    #38

                                    I configured openssl like this:

                                    perl Configure VC-WIN32 --prefix=c:\Qt\openssl-1.0.1f\openssl-1.0.1f\release

                                    Qt5 like this:

                                    configure -opensource -opengl desktop -nomake tests -openssl -I C:\qt\openssl-1.0.1f\openssl-1.0.1f\include

                                    Also tried with C++11:

                                    configure.exe -platform win32-msvc2012 -c++11 -opensource -openssl -I C:\qt\openssl-1.0.1f\openssl-1.0.1f\include

                                    The error message points to this line of code:

                                    SSL* createSsl();
                                    

                                    I can't see anything wrong with that. Error message below.

                                    Ideas?

                                    Robin

                                    qhttpthreaddelegate.cpp
                                    C:\qt\openssl-1.0.1f\openssl-1.0.1f\include\openssl/ssl.h(1) : error C2059: synt
                                    ax error : '.'
                                    c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                                    se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                                    context_p.h(69) : error C2143: syntax error : missing ';' before '*'
                                    c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                                    se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                                    context_p.h(69) : error C4430: missing type specifier - int assumed. Note: C++ d
                                    oes not support default-int
                                    c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                                    se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                                    context_p.h(69) : warning C4183: 'createSsl': missing return type; assumed to be
                                    a member function returning 'int'
                                    c:\qt\qt-everywhere-opensource-src-5.2.1\qt-everywhere-opensource-src-5.2.1\qtba
                                    se\include\qtnetwork\5.2.1\qtnetwork\private../../../../../src/network/ssl/qssl
                                    context_p.h(70) : error C2061: syntax error : identifier 'SSL'

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      mwpowellhtx
                                      wrote on last edited by
                                      #39

                                      This was a forum about building Qt. Not openssl. Can I suggest start fresh so as not to confuse readers?

                                      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