I had the same problem as here fatal error C1034: windows.h: no include path set
cl main.cpp xxxlib.lib
warning LNK4272: library machine type 'x64' conflict with target machine type 'x86'
In order to make sure you have the proper environment variables set, the simplest way is to launch the respective command shell in the start menu.
For 64bit, this would be
Visual Studio x64 Win64 Command Prompt (2010), then cl.exe is automatically correct. If you show the properties of this entry in the start menu, you'll also find more infos:
%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" amd64
From this, you see that the working directory is set, and
vcvarsall.bat is called with the
amd64 parameter. This is probably what you missed.