Since no one has mentioned this, one of the simplest way to fix this issue is to add your target architecture in the preprocessor definitions.
The can be done by going to:
Properties > Configuration Properties > C/C++ > Preprocessor
Then in the Preprocessor Definitions tab, add the missing architecture (Ex: *_*AMD64_)