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



  • Configuration: Win7(64), MSVS 2012, QT5.0.2(64)
    Trouble: a some problems with linking.

    <code>
    Generating Code...
    Compiling...
    moc_qwt_analog_clock.cpp
    moc_qwt_compass.cpp
    moc_qwt_counter.cpp
    moc_qwt_dial.cpp
    moc_qwt_knob.cpp
    moc_qwt_slider.cpp
    moc_qwt_thermo.cpp
    moc_qwt_wheel.cpp
    Generating Code...
    linking ..\lib\qwt.dll
    Qt5OpenGL.lib(Qt5OpenGL.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
    NMAKE : fatal error U1077: 'echo' : return code '0x458'
    Stop.
    NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\BIN\nmake.exe"' : return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    </code>


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    I would say that your are building your project in 32bit mode while linking to a 64bit Qt



  • How do I change the target for my project? Particularly, I am trying to build QWT and seeing this error.

    [quote author="SGaist" date="1367482099"]Hi and welcome to devnet,

    I would say that your are building your project in 32bit mode while linking to a 64bit Qt[/quote]


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Select the win64 console in the Visual Studio submenus and configure/build Qwt from there, you should be good to go then



  • Qwt doesn't have a visual studio project attached, so I'm building from command line, using VS2010 compiler through qcc.

    Can you please suggest, how I should pull the qwt project into Visual Studio?

    [quote author="SGaist" date="1377982324"]Hi and welcome to devnet,

    Select the win64 console in the Visual Studio submenus and configure/build Qwt from there, you should be good to go then[/quote]


  • Lifetime Qt Champion

    You can simply use the
    @
    qmake
    nmake
    @

    combo from the command line



  • You will also get this error on the console when you didn't select Qt with OpenGL during install (Qt 5.3.2). However when building with Qt creator it will additionally error: file not found.



  • If you are building from the command line, make sure you are using the 'VS2012 x64 Native Tools Command Prompt' (you'll find it under the Visual Studio menu in Start->All Programs).


Log in to reply
 

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