QtCored4.lib(QtCored4.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'



  • Hello, hope everyone had a merry christmas (at least a belly full)
    I have searched the forums and "why I can't run qt components on my computer | Qt DevNet forums ...":http://developer.qt.nokia.com/forums/viewthread/7516 has not dispelled my compilation error.

    1. I am in a 64bit machine with Windows 7 64bit installed (confirmed in Control Panel - System)
    2. I have Microsoft Visual Studio 2010 Version 10.0.40219.1 SP1Rel installed
    3. I have downloaded and installed "Qt libraries 4.8.0 for Windows [VS 2010, 275 MB)":http://qt.nokia.com/downloads/windows-cpp-vs2010
      -) I have successfully test-ran a couple of Qt demo executables from Qt4.8.0\demos
      -) Qt4.8.0\bin fullpath is in windows PATH environment variable
      -) Qt4.8.0\bin and Qt4.8.0\lib fullpaths are in the linker's "Additional Libraries Directories"

    What's missing?.. I'm at a loss here.. :(

    PS: and the only x86 reference I can find now is in the path name "Program Files(x86)", isn't that so lame of Windows 7 to have such a default program folder?



  • Seems as if you are mixing 32 bit (x86) and 64 bit (x64) code. The downloadable binaries are 32 bit. You will have to build your own applications and libraries as 32 bit too. Being on a 64 bit Windows machine does not matter in this case. The 32bit code will run too.



  • Ok, just finished compiling Qt from scratch

    configure -mp
    nmake

    (I even deleted the existing QtCore4.dll and .lib in \bin and \lib to make sure)

    and the result @QtCored4.lib(QtCored4.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'@

    :, please, again, what might I be missing?

    EDIT: And @nmake distclean
    configure -mp -platform win64-icc@
    or
    @configure -mp -platform win64-msvc@
    aren't accepted



  • Sorry, I never used 64 bit builds on Windows, so I just can guess. And as there are no predefined specs for Windows 64 bit builds, you'll have to create something yourself. Looks like you still have 32 bit Qt libs.

    Do you absolutely need your application as 64 bit binary?



  • [quote author="Volker" date="1324998362"]Do you absolutely need your application as 64 bit binary?[/quote] Good question. And yes. I need to link also against 64bit Matlab libs.
    My executable needs Matlab libs, and in my 32bit PC he can't access enough RAM to run the current experiments I need to run.

    [quote author="Volker" date="1324998362"]And as there are no predefined specs for Windows 64 bit builds, you'll have to create something yourself.[/quote] Can you help me do so?



  • [quote author="wurmd" date="1325002417"] Can you help me do so?
    [/quote]

    Sorry, I'm out of the game at this point...



  • [quote author="Volker" date="1325027180"]Sorry, I'm out of the game at this point...
    [/quote]No worries,

    Where can I learn what I need to make Qt guaranteedly compile 64b binaries?

    Or who else can I ask?



  • Ok, apparent success

    I followed http://www.holoborodko.com/pavel/2011/02/01/how-to-compile-qt-4-7-with-visual-studio-2010/ with the detail of opening “Visual Studio x64 Win64 Command Prompt (2010)” directly from my start menu

    and voilá, created dll's that don't give linker errors.

    But the demo executables weren't created... To be 100% sure Qt was correctly compiled it would be nice to have the executables to run.

    Why do you think the executables weren't created?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.