This series on troubleshoots buiding Windows Vista SDK samples on X64 machines. Found a workaround to another issues? Share them here or email me.
7. Error: Linking….\Release\Foo.obj : fatal error LNK1112: module machine type ‘x64’ conflicts with target machine type ‘X86’
Problem: Not all Windows SDK samples with Visual C++ 2005 project files have configurations to build for X64. We’re working towards complete 64-bit parity for all samples and this will get better with each SDK release. We’re making a big push in the the Windows SDK for Microsoft Windows Server code name “Longhorn” and .Net Framework 3.5.
Load the sample in Visual Studio (C++) 2005 and update the Configuration Manager under Project | Properties. Additionally, if you do not install libraries for all CPU architectures during SDK setup, some samples with Visual C++ 2005 project files may fail to build with this error for all configurations in the project file:
fatal error LNK1181: cannot open input file
For example, if a sample has an x86 configuration and x86 libraries were NOT installed (these are installed by default when installing the SDK on a X64 machine), that sample’s x86 configuration will fail to build. To workaround this issue, add the necessary components to your SDK install. Open Control Panel, select Add/Remove Programs (Programs and Features on Vista), select the appropriate SDK and use the Change functionality to update the Microsoft Windows Software Development Kit.
Windows SDK Samples Program Manager