SDK Workaround: Not All C++ Samples with are Configured for X64

This workaround applies to:

 

·         The prerelease Windows SDK for Windows Server 2008 and .Net Framework 3.5 (RC0), September, 2007

·         The prerelease Windows SDK for Windows Server 2008 and .Net Framework 3.5 (IDS04), July, 2007

·         The Windows SDK Update for Windows Vista (RTM), March, 2007

·         The Windows SDK for Windows Vista (RTM), November, 2006

 

Not all samples with Visual C++ 2005 project files have configurations to build for X64. When building a C++ sample that does not have support for X64 on an X64 machine, you may see the following error message:

 

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

 

To workaround this issue, 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.