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. Compiling static Qt libraries with /MT using MSVC2010

Compiling static Qt libraries with /MT using MSVC2010

Scheduled Pinned Locked Moved Installation and Deployment
6 Posts 3 Posters 6.0k 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.
  • D Offline
    D Offline
    didac.perez
    wrote on last edited by
    #1

    Dear all,

    I am trying to build QT libraries statically and with /MT (runtime static linking).

    I have followed the next steps:

    1. Go to qmake.conf file and modify /MD to /MT in both release and debug configurations
    2. I run configure command like this: configure -static -opensource
    3. I run nmake

    The problem is that nmake fails a few seconds after running. Here are the last output:
    @
    qjson.cpp
    qjsondocument.cpp
    qjsonobject.cpp
    qjsonarray.cpp
    qjsonvalue.cpp
    qjsonparser.cpp
    qjsonwriter.cpp
    Generating Code...
    cl -c -nologo -Zm200 -Zc:wchar_t -O2 -MT -W3 -w34100 -w34189 -GR -DUNICO
    DE -DWIN32 -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_COD
    ECS -DQT_NO_DATASTREAM -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -DQT
    _NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQT
    _NO_TRANSLATION -DQT_QMAKE_LOCATION="F:/utils/Qt/5.0.0/Src/qtbase/bin/qmake" -
    DQT_NO_CAST_FROM_ASCII -DQT_BUILD_BOOTSTRAP_LIB -DQT_BUILDING_QT -DQT_ASCII_CAST
    WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT
    DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -DQT_NO_DEBUG -DQT_NO_EXC
    EPTIONS -I"......\include" -I"......\include\QtCore" -I"......\include\QtC
    ore\5.0.0" -I"......\include\QtCore\5.0.0\QtCore" -I"......\include\QtXml" -
    I"F:\utils\Qt\5.0.0\Src\qtbase\include\QtXml\5.0.0" -I"F:\utils\Qt\5.0.0\Src\qtb
    ase\include\QtXml\5.0.0\QtXml" -I"tmp" -I"....\corelib\global" -I"....\3rdpart
    y\zlib" -I"......\mkspecs\win32-msvc2010" -Fo.obj\release_static\ @C:\Users\DI
    DAC~1.PER\AppData\Local\Temp\nmE62A.tmp
    qdom.cpp
    ......\include\QtXml\qdom.h(1) : fatal error C1083: Cannot open include file:
    '../../../../../../../../f:/utils/Qt/5.0.0/Src/qtbase/src/xml/dom/qdom.h': Inval
    id argument
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\cl.EXE"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    @

    Please, are you experiencing the same result? Anybody know how to solve this problem? Thanks in advance,

    Cheers,
    Dídac Pérez

    1 Reply Last reply
    0
    • D Offline
      D Offline
      didac.perez
      wrote on last edited by
      #2

      Hi all,

      I have fixed the error. I think configure command generates wrong header files. For instance, qdom.h in qtbase/include/qtxml were like this:
      #include "../../../../../../../../f:/utils/Qt/5.0.0/Src/qtbase/src/xml/dom/qdom.h"
      and I had to move to:
      #include "../../src/xml/dom/qdom.h"

      And now it works. Maybe this is an issue of qt building system.

      Kind regards,

      1 Reply Last reply
      0
      • K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        welcome to devnet

        I cannot judge if this is a bug of the building system or not. However, you can check on "JIRA":https://bugreports.qt-project.org/secure/Dashboard.jspa if it has been already reported. Furthermore, you can place also a bug report there. This ensures that the problem is not ignored. The devnet forum is NOT rigorously checked for eventual bugs by the development team.

        When you decide to place a bug report, it is also good to post the link here. This helps others to find a solution and they can vote for an issue increasing the visibility and importance.

        BTW It is Qt. QT is Quick Time.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • D Offline
          D Offline
          didac.perez
          wrote on last edited by
          #4

          Thanks for your comments! I have still experiencing problems during the build so I will post it there. Thanks for the difference between Qt and QT :-)

          1 Reply Last reply
          0
          • L Offline
            L Offline
            loctar
            wrote on last edited by
            #5

            Link to the bug: "QTBUG-28761":https://bugreports.qt-project.org/browse/QTBUG-28761

            1 Reply Last reply
            0
            • D Offline
              D Offline
              didac.perez
              wrote on last edited by
              #6

              Yep, I reported that bug :P

              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