I am trying to build a blank, 64-bit C++ application in Visual Studio 2005 Professional using these steps:
- Create a new Win32 Console Application project
- Go to Configuration Manager, create new Solution Platform of type x64, copy settings from Win32
- Save & build
However, I get this error:
LINK : fatal error LNK1104: cannot open file 'kernel32.lib'
So, I tried updating the library directories to point to kernel32.lib
:
- Go to Project Properties, Linker, General, Additional Library Directories and set "C:\Program Files\Microsoft Visual Studio 8\VC\lib\amd64"
- Save & build
This gives me the error:
LINK : fatal error LNK1104: cannot open file 'user32.lib'
So, I tried updating the library directories to point to user32.lib
:
- Go to Project Properties, Linker, General, Additional Library Directories and add "C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64"
- Save & build
But now I am getting the error:
.\x64\debug\stdafx.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
Any ideas what I am doing wrong?