LNK1112: module machine type 'x64' conflicts with target machine type 'X86': Qt creator
-
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/ -lomniORB4INCLUDEPATH += $$PWD/../../../../../../../../tango-root/tango/win64/lib/vc10
DEPENDPATH += $$PWD/../../../../../../../../tango-root/tango/win64/lib/vc10 -
-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.
-
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.
-
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
-
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?
-
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
-
Thanks.Also do i need to have visual studio 2013 on my machine.I have 2008 and 2010 on my machine.
-
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.
-
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?
-
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).
-
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?
-
Did you add a new Kit that uses your newly installed Qt 64bit ?
-
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.