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. Build dll qt 5.6.3 with "/INTEGRITYCHECK" option
Forum Updated to NodeBB v4.3 + New Features

Build dll qt 5.6.3 with "/INTEGRITYCHECK" option

Scheduled Pinned Locked Moved Solved Installation and Deployment
12 Posts 3 Posters 2.2k Views 2 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.
  • N Offline
    N Offline
    nguyenphongmmo
    wrote on last edited by nguyenphongmmo
    #1

    hello
    I want to add "IntegrityCheck" option to qt when i build it with msvc2010. So I have edited the value of flag QMAKE_LFLAGS_DLL to "/DLL /INTEGRITYCHECK" in file "...\Qt\5.6.3\qtbase\mkspecs\common\msvc-desktop.conf"

    And i get this error

    call C:\Qt\5.6.3\qtbase\src\widgets\uic_wrapper.bat dialogs\q
    filedialog.ui -o .uic\ui_qfiledialog.h
    NMAKE : fatal error U1077: 'call' : return code '0xc0000428'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0
    \VC\BIN\amd64\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.
    

    How can I fix it? Can you show me another way to make this easier?
    Thank a lot.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Maybe a silly question but can you build Qt without your modification ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply
      1
      • SGaistS SGaist

        Hi,

        Maybe a silly question but can you build Qt without your modification ?

        N Offline
        N Offline
        nguyenphongmmo
        wrote on last edited by nguyenphongmmo
        #3

        @SGaist yes. If i don't modify this flag, I will build qt from source successfully. I checked it out. But I need build dll qt with "/INTEGRITYCHECK" option. So I have editted this flag. Thanks for the reply...

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Are you doing a completely fresh build after modifying the mkspec ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          N 1 Reply Last reply
          1
          • SGaistS SGaist

            Are you doing a completely fresh build after modifying the mkspec ?

            N Offline
            N Offline
            nguyenphongmmo
            wrote on last edited by
            #5

            @SGaist yes. I build qt from completely new source code

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              What parameters are you passing to configure ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              N 1 Reply Last reply
              1
              • SGaistS SGaist

                What parameters are you passing to configure ?

                N Offline
                N Offline
                nguyenphongmmo
                wrote on last edited by nguyenphongmmo
                #7

                @SGaist This is my parameters for configure.

                configure.bat -prefix C:\Qt\5.6.3\x86 -mp -opensource -confirm-license -nomake tests -nomake examples -no-compile-examples -release -shared -pch -no-ltcg -accessibility -no-sql-sqlite -opengl desktop -no-openvg -no-nis -no-iconv -no-evdev -no-mtdev -no-inotify -no-eventfd -largefile -no-system-proxies -qt-zlib -qt-pcre -no-icu -qt-libpng -qt-libjpeg -qt-freetype -no-fontconfig -qt-harfbuzz -no-angle -incredibuild-xge -no-plugin-manifests -qmake -qreal double -rtti -strip -no-ssl -no-openssl -no-libproxy -no-dbus -no-audio-backend -no-wmf-backend -no-qml-debug -no-direct2d -directwrite -no-style-fusion -native-gestures -skip qt3d -skip qtactiveqt -skip qtandroidextras -skip qtcanvas3d -skip qtconnectivity -skip qtdeclarative -skip qtdoc -skip qtenginio -skip qtgraphicaleffects -skip qtlocation -skip qtmacextras -skip qtmultimedia -skip qtquickcontrols -skip qtquickcontrols2 -skip qtscript -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtx11extras -skip qtxmlpatterns
                

                PS: I have switched to build qt 5.6.3 and still have the same error

                process building qt stopped when it call file uic_wrapper.bat. So I try opening this file and receive popup error message

                \qtbase\lib\Qt5Core.dll is either not designed to run on windows or it contains an error. Try installing the program again using original installation media or contact your system asministrator or the sofware vendor for support
                

                What should I do?

                1 Reply Last reply
                0
                • Christian EhrlicherC Offline
                  Christian EhrlicherC Offline
                  Christian Ehrlicher
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  Afaics you must also sign the Dlls - simply passing this flag will not help (and the check will fail because the dll is not signed) - https://social.technet.microsoft.com/wiki/contents/articles/255.forced-integrity-signing-of-portable-executable-pe-files.aspx

                  Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                  Visit the Qt Academy at https://academy.qt.io/catalog

                  N 1 Reply Last reply
                  2
                  • Christian EhrlicherC Christian Ehrlicher

                    Afaics you must also sign the Dlls - simply passing this flag will not help (and the check will fail because the dll is not signed) - https://social.technet.microsoft.com/wiki/contents/articles/255.forced-integrity-signing-of-portable-executable-pe-files.aspx

                    N Offline
                    N Offline
                    nguyenphongmmo
                    wrote on last edited by
                    #9

                    @Christian-Ehrlicher thank for helping. I have solved my problem. Thank you

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      Great !

                      Can you share the details ? It could be useful in the future for other people trying to do the same thing as you.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • N Offline
                        N Offline
                        nguyenphongmmo
                        wrote on last edited by nguyenphongmmo
                        #11

                        To fix the error when building dll qt with "/ INTEGRITYCHECK" option, you must sign Qt5Core.dll and Qt5Xml.dll before building qt. Two dlls is located in ".\qtbase\lib". You can use Windows Driver Development Kit for signing dlls . After successfully building qt, you must sign all the dlls which you need to use.
                        To check the Integrity Check flag has been set in dll headers, you can use this command:

                        Link.exe /dump /headers [name].dll
                        

                        Check under “DLL characteristics”, it should have “Check integrity” option
                        Link download WDK: https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11800

                        1 Reply Last reply
                        2
                        • SGaistS Offline
                          SGaistS Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          Thanks !

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          1

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved