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. LNK1112: module machine type 'x64' conflicts with target machine type 'X86': Qt creator
Forum Updated to NodeBB v4.3 + New Features

LNK1112: module machine type 'x64' conflicts with target machine type 'X86': Qt creator

Scheduled Pinned Locked Moved General and Desktop
17 Posts 3 Posters 9.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.
  • A Offline
    A Offline
    avallabh88
    wrote on last edited by
    #1

    I have a application running on linux which I am trying to import on windows. I have set up all the libraries and also made changes to the .pro file. Now when I try to build the project I get this error:

    error: LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

    I am not sure what is causing this issue.I am using the 32-bit Qt creator.I am using Qt creator and running the project through the Qt UI. So I am not sure what changes have to be done for the project properties through Qt if this has to be resolved.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      alex_malyu
      wrote on last edited by
      #2

      I can't point directly how to solve the problem, but I doubt this is related to which QtCreator version you are using.
      All I can say this is result of the your executable linking against wrong lib (dll).
      This may be QT, CRT or any other libraries.
      Unfortunately we can't use Creator for development so I am not experienced enough with it to advice where to check it. Might be a good idea to check Projects\Dependencies or Projects\Build & Run

      Regards,
      Alex

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

        Hi,

        Are you by any chance linking to an external library that's built in 64bit and you project uses a 32bit Qt ?

        Like alex_malyu wrote, the fact that Qt Creator is 32bit has nothing to do with building your application.

        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
        0
        • A Offline
          A Offline
          avallabh88
          wrote on last edited by
          #4

          I went through it and could not find a place where the linker properties could be changed. Do you know where I can change the qmake or linker properties in QT?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            avallabh88
            wrote on last edited by
            #5

            I am actually using omniORB4 and this error which is generated is from that .lib file(omniORB4d.lib). This is the configuration I have in my .pro file:

            win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../../../../../../tango-root/tango/win64/lib/vc10/ -lomniORB4
            else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../../../../../../tango-root/tango/win64/lib/vc10/ -lomniORB4d
            else:unix: LIBS += -L$$PWD/../../../../../../../../tango-root/tango/win64/lib/vc10/ -lomniORB4

            INCLUDEPATH += $$PWD/../../../../../../../../tango-root/tango/win64/lib/vc10
            DEPENDPATH += $$PWD/../../../../../../../../tango-root/tango/win64/lib/vc10

            1 Reply Last reply
            0
            • A Offline
              A Offline
              alex_malyu
              wrote on last edited by
              #6

              -L$$PWD/../../../../../../../../tango-root/tango/*win64/*lib/vc10/ -lomniORB4

              Having win64 in the path mostly guarantee that library was built as 64 bit, when your application seems as 32 bit.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                avallabh88
                wrote on last edited by
                #7

                My application is a 32bit because it is using Qt which is 32-bit.In that case how I can resolve this issue?How can we use libraries which are built on 64 bit on 32-bit applications.

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

                  You can't mix architecture. If that libraries doesn't come in 32bit then use a Qt 64 bit package and from what I see, you should get the VS2010 version

                  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
                  0
                  • A Offline
                    A Offline
                    avallabh88
                    wrote on last edited by
                    #9

                    I looked for a qt-64 bit package but I could not find any.could you let me know where I can get that package?

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

                      My bad, there's only the Visual Studio 2013 that are available in 64bit however you can find "here":http://www.tver-soft.org/qt64 a set of user generated 64 builds

                      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
                      0
                      • A Offline
                        A Offline
                        avallabh88
                        wrote on last edited by
                        #11

                        Thanks.Also do i need to have visual studio 2013 on my machine.I have 2008 and 2010 on my machine.

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          alex_malyu
                          wrote on last edited by
                          #12

                          keep in mind that 32 bit will run on both 32 and 64 bit Windows when 64 bit only on 64 bit Windows.

                          You can build Qt on your own if there are not binaries to download, also I guess you can either find or build 32 bit version of the 3rd party library yourself.

                          1 Reply Last reply
                          0
                          • A Offline
                            A Offline
                            avallabh88
                            wrote on last edited by
                            #13

                            Yeah I got it but in that case when my Qt is 32-but why is it not able to execute libraries which are 64-bit?For external libraries which are 64-bit do we need Wt which is only 64-bit?

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              alex_malyu
                              wrote on last edited by
                              #14

                              You need all modules be the same architecture.
                              Either 32 bit or 64 bit.

                              64 bit Windows allows you to run 32 bit application, but you still can't mix different binaries on any platform.

                              You have to have all binaries built with the same architecture and most of the time with the same compiler with very little exceptions which are not applied to statically linked libraries.

                              AFAIK if you have access to the already built libraries you need to make sure you get Qt version (as other dependencies) built with the same compiler including platform (32 or 64 bit).

                              1 Reply Last reply
                              0
                              • A Offline
                                A Offline
                                avallabh88
                                wrote on last edited by
                                #15

                                I installed Qt 64-bit and I still have the same problem. When I configured the project it asked me to select a kit and I chose "Visual Studio 2010" which is the only kit that i have and it is 32-bit. So basically the compiler is 32-bit,is that why I am getting the same error?

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

                                  Did you add a new Kit that uses your newly installed Qt 64bit ?

                                  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
                                  0
                                  • A Offline
                                    A Offline
                                    alex_malyu
                                    wrote on last edited by
                                    #17

                                    Visual Studio 2010 has 2 compiler versions (in fact 3)
                                    32 bit, 64 bit and 32 bit compiler which produces 64 bit code.
                                    You need to make sure you configured creator to use proper compiler.

                                    As I mentioned I am not using creator, so can't give you direct advice how.

                                    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