Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Link external library with MSCV compiler
QtWS25 Last Chance

Link external library with MSCV compiler

Scheduled Pinned Locked Moved Solved General and Desktop
qtcreator 5.11librarylinker errorsmsvcmingw
34 Posts 4 Posters 14.3k 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.
  • J jsulm
    23 Aug 2018, 12:20

    @elsa OK, you have 32bit Qt, compiler and lib - does it work now?

    E Offline
    E Offline
    elsa
    wrote on 23 Aug 2018, 12:23 last edited by
    #25

    @jsulm it produces this error:

    f:\dd\vctools\crt\vcstartup\src\gs\gs_report.c:220: error: Debugger encountered an exception: Exception at 0xca9b99, code: 0xc0000409: , flags=0x1 (execution cannot be continued)
    f:\dd\vctools\crt\vcstartup\src\gs\gs_report.c:220: error: Debugger encountered an exception: Exception at 0xca9b99, code: 0xc0000409: , flags=0x1 (execution cannot be continued)
    
    J 1 Reply Last reply 23 Aug 2018, 12:27
    0
    • E elsa
      23 Aug 2018, 12:23

      @jsulm it produces this error:

      f:\dd\vctools\crt\vcstartup\src\gs\gs_report.c:220: error: Debugger encountered an exception: Exception at 0xca9b99, code: 0xc0000409: , flags=0x1 (execution cannot be continued)
      f:\dd\vctools\crt\vcstartup\src\gs\gs_report.c:220: error: Debugger encountered an exception: Exception at 0xca9b99, code: 0xc0000409: , flags=0x1 (execution cannot be continued)
      
      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 23 Aug 2018, 12:27 last edited by
      #26

      @elsa But this is when you try to run/debug the app, right?
      Building it works?
      To debug this error you should build in debug mode.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      E 2 Replies Last reply 23 Aug 2018, 12:30
      1
      • J jsulm
        23 Aug 2018, 12:27

        @elsa But this is when you try to run/debug the app, right?
        Building it works?
        To debug this error you should build in debug mode.

        E Offline
        E Offline
        elsa
        wrote on 23 Aug 2018, 12:30 last edited by elsa
        #27

        @jsulm oh true!! Sorry, I mixed it up. Yes, with the debugger it crashes at the end of one the functions.. I look into it more closely..

        1 Reply Last reply
        0
        • J jsulm
          23 Aug 2018, 12:27

          @elsa But this is when you try to run/debug the app, right?
          Building it works?
          To debug this error you should build in debug mode.

          E Offline
          E Offline
          elsa
          wrote on 23 Aug 2018, 13:10 last edited by
          #28

          @jsulm
          I commented some lines out to find the source of the problem and now it's producing the linking error again -.- This is the compile output:

          	C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
          	link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\DecaRangeRTLS.exe @C:\Users\FRHMELSA\AppData\Local\Temp\DecaRangeRTLS.exe.5688.156.jom
          Qt53DExtrasd.lib(Qt53DExtrasd.dll) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
          jom: C:\Users\FRHMELSA\Documents\Projects\build-TREKdisplay-Desktop_Qt_5_11_1_MSVC2017_32bit-Debug\Makefile.Debug [debug\DecaRangeRTLS.exe] Error 1112
          jom: C:\Users\FRHMELSA\Documents\Projects\build-TREKdisplay-Desktop_Qt_5_11_1_MSVC2017_32bit-Debug\Makefile [debug] Error 2
          15:06:47: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
          Error while building/deploying project TREKdisplay (kit: Desktop Qt 5.11.1 MSVC2017 32bit)
          The kit Desktop Qt 5.11.1 MSVC2017 32bit has configuration issues which might be the root cause for this problem.
          When executing step "Make"
          

          So the problem is with Qt3DExtras? Is this library 64bit? But this doesn't make sense right? Because whole Qt is 32bit and this is just part of it.

          J J 2 Replies Last reply 24 Aug 2018, 04:21
          0
          • E elsa
            23 Aug 2018, 13:10

            @jsulm
            I commented some lines out to find the source of the problem and now it's producing the linking error again -.- This is the compile output:

            	C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
            	link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\DecaRangeRTLS.exe @C:\Users\FRHMELSA\AppData\Local\Temp\DecaRangeRTLS.exe.5688.156.jom
            Qt53DExtrasd.lib(Qt53DExtrasd.dll) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
            jom: C:\Users\FRHMELSA\Documents\Projects\build-TREKdisplay-Desktop_Qt_5_11_1_MSVC2017_32bit-Debug\Makefile.Debug [debug\DecaRangeRTLS.exe] Error 1112
            jom: C:\Users\FRHMELSA\Documents\Projects\build-TREKdisplay-Desktop_Qt_5_11_1_MSVC2017_32bit-Debug\Makefile [debug] Error 2
            15:06:47: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
            Error while building/deploying project TREKdisplay (kit: Desktop Qt 5.11.1 MSVC2017 32bit)
            The kit Desktop Qt 5.11.1 MSVC2017 32bit has configuration issues which might be the root cause for this problem.
            When executing step "Make"
            

            So the problem is with Qt3DExtras? Is this library 64bit? But this doesn't make sense right? Because whole Qt is 32bit and this is just part of it.

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 24 Aug 2018, 04:21 last edited by
            #29

            @elsa Delete build folder, run qmake and build again.

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            E 1 Reply Last reply 24 Aug 2018, 07:01
            2
            • J jsulm
              24 Aug 2018, 04:21

              @elsa Delete build folder, run qmake and build again.

              E Offline
              E Offline
              elsa
              wrote on 24 Aug 2018, 07:01 last edited by
              #30
              This post is deleted!
              1 Reply Last reply
              0
              • E elsa
                23 Aug 2018, 13:10

                @jsulm
                I commented some lines out to find the source of the problem and now it's producing the linking error again -.- This is the compile output:

                	C:\Qt\Tools\QtCreator\bin\jom.exe -f Makefile.Debug
                	link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /SUBSYSTEM:WINDOWS "/MANIFESTDEPENDENCY:type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' publicKeyToken='6595b64144ccf1df' language='*' processorArchitecture='*'" /MANIFEST:embed /OUT:debug\DecaRangeRTLS.exe @C:\Users\FRHMELSA\AppData\Local\Temp\DecaRangeRTLS.exe.5688.156.jom
                Qt53DExtrasd.lib(Qt53DExtrasd.dll) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
                jom: C:\Users\FRHMELSA\Documents\Projects\build-TREKdisplay-Desktop_Qt_5_11_1_MSVC2017_32bit-Debug\Makefile.Debug [debug\DecaRangeRTLS.exe] Error 1112
                jom: C:\Users\FRHMELSA\Documents\Projects\build-TREKdisplay-Desktop_Qt_5_11_1_MSVC2017_32bit-Debug\Makefile [debug] Error 2
                15:06:47: The process "C:\Qt\Tools\QtCreator\bin\jom.exe" exited with code 2.
                Error while building/deploying project TREKdisplay (kit: Desktop Qt 5.11.1 MSVC2017 32bit)
                The kit Desktop Qt 5.11.1 MSVC2017 32bit has configuration issues which might be the root cause for this problem.
                When executing step "Make"
                

                So the problem is with Qt3DExtras? Is this library 64bit? But this doesn't make sense right? Because whole Qt is 32bit and this is just part of it.

                J Offline
                J Offline
                JonB
                wrote on 24 Aug 2018, 07:21 last edited by JonB
                #31

                @elsa

                Qt53DExtrasd.lib(Qt53DExtrasd.dll) : fatal error LNK1112: module machine type 'x86' conflicts with target machine type 'x64'
                So the problem is with Qt3DExtras? Is this library 64bit?

                I read this the other way round. I have searched this error and MS docs state it's a "version mismatch" but nowhere clarify which is which in the error message... :(

                I believe this is saying: Qt53DExtrasd is a module which is compiled x86 (32-bit), but your overall LINK is targetting x64 (64-bit).

                If that's the case, somehow your makefile/compilation/link is still targetting 64-bit when you want it to target 32-bit.... Make 100% sure that whatever the qmake generates (a makefile?) has no references to 64-bit but only to 32-bit, and that everything (of yours) is rebuilt from scratch.

                1 Reply Last reply
                0
                • E Offline
                  E Offline
                  elsa
                  wrote on 24 Aug 2018, 09:16 last edited by
                  #32

                  @jsulm @JonB thank you both a lot for your patience! The deleting of the build folder suggested by @jsulm did it. Now it builds fine, but I still cannot run it :( (see new thread). I will mark this question as solved as the linking is now successful.

                  J 1 Reply Last reply 24 Aug 2018, 11:23
                  0
                  • E elsa
                    24 Aug 2018, 09:16

                    @jsulm @JonB thank you both a lot for your patience! The deleting of the build folder suggested by @jsulm did it. Now it builds fine, but I still cannot run it :( (see new thread). I will mark this question as solved as the linking is now successful.

                    J Offline
                    J Offline
                    JonB
                    wrote on 24 Aug 2018, 11:23 last edited by
                    #33

                    @elsa Good. That's why we said you have to clean out completely if you change fundamental compilation, something will have been left over without doing that.

                    E 1 Reply Last reply 24 Aug 2018, 11:27
                    1
                    • J JonB
                      24 Aug 2018, 11:23

                      @elsa Good. That's why we said you have to clean out completely if you change fundamental compilation, something will have been left over without doing that.

                      E Offline
                      E Offline
                      elsa
                      wrote on 24 Aug 2018, 11:27 last edited by
                      #34

                      @JonB well, I thought it just creates a new build file for the new compiler (which it does), but I have to admit my understanding for compilers is not very deep.

                      1 Reply Last reply
                      0

                      34/34

                      24 Aug 2018, 11:27

                      • Login

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