Microsoft Developer Network > Forums Home > Archived Forums Forums > Visual C++ 2008 (Pre-release) > fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

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

  • Sunday, March 02, 2008 12:19 AM
     
     

    I just installed Visual Studio 2008 and when I tried to compile a program, I got an error that involved not finding cl.exe.  I added directories for libraries and in Executeable Files, C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\x86_amd64.  Now when I try to compile I get the subject error.  Is/are there other directories I should add under option?

All Replies

  • Tuesday, March 10, 2009 4:01 PM
     
     
    I am having the same problem.

    Vista Business 32-bit OS
    Visual Studio 2008 Standard w/ SP1 installed

    The only versions of cl.exe that were installed are in amd64 and x86_amd64.  There is no copy in the standard bin directory as there is when I install on XP.  I am going to try patching the install with files from my XP setup and will post results back here.

    --Will
  • Tuesday, March 10, 2009 4:14 PM
     
     Proposed Answer
    Something seems to be broken in the installer for 32-bit Vista.  I'm not sure what causes it to think the system is AMD64, but here's what I did to fix my inability to build.  The system in question is a Pentium 4 2.8 GHz with hyperthreading enabled.

    I noticed that my bin directory on Vista had quite a few missing files versus the XP install.  77 files and 28.1 MB for Vista.  86 files and 30.8 MB for XP.

    I copied the entire contents of C:\Program Files\Microsoft Visual Studio 9.0\VC\bin from my XP machine to the Vista machine and voila - the build completed successfully.

    cl.exe should have been installed in that directory but was not.  It seems that the installer didn't configure the environment properly.

    --Will
    • Proposed As Answer by Will Bickford Tuesday, March 10, 2009 4:14 PM
    •