none
LNK1112: module machine type 'X86' conflicts with target machine type 'x64' in Visual Studio RRS feed

  • Question

  • Hello,

       I have a project that will not compile for release. I read posts like this, but could not find a solution that works for me.

    1. my machine type is x64
    2. my configuration in project manager is x64
    3. paths are questionable, for linker they look like this:
      C:\WINDDK\7600.16385.1\lib\Crt\$(PlatformTarget);C:\WINDDK\7600.16385.1\lib\Win7\$(PlatformTarget);$(VCInstallDir)lib\$(PlatformTarget);$(VCInstallDir)lib;$(VCInstallDir)atlmfc\lib;$(WindowsSdkDir)lib\$(PlatformTarget);$(WindowsSdkDir)lib;$(FrameworkSDKDir)\lib\$(PlatformTarget);$(FrameworkSDKDir)\lib;$(LibraryPath)
    4. I looked for AdditionalOptions in vcxproj files but section is not present in any of them

    Projects are created for VS2017, but I am opening them in VS2019 while they use installed toolset for VS2013.

    Project uses WDK 7.

    Error message I receive is:

    LNK1112 module machine type 'X86' conflicts with target machine type 'x64' [...] \MSVCRT.lib(MSVCR120.dll)

    Thanks in advance

    Wednesday, September 11, 2019 12:09 AM

All replies

  • I changed $(VCInstallDir)lib\$(PlatformTarget); to $(VCInstallDir)lib\amd64 and it works now.
    • Proposed as answer by Guido Franzke Wednesday, September 11, 2019 7:58 AM
    Wednesday, September 11, 2019 12:31 AM
  • Hi,

    I am glad you have got your solution and thanks for your sharing, I would appreciate it if you mark them as answer and this will be beneficial to other community.

    Best Regards,

    Jeanine Zhang

    Wednesday, September 11, 2019 1:13 AM
    Moderator