Intel® C++ Compiler for Windows* - Error: couldn't open file

When using the Intel® C++/Fortran Compiler for IA-64 with the Microsoft* Platform SDK (Build 1289 or later), if you get the following error messages:

C:hello>icl hello.c
Intel® C++ Compiler for applications running on IA-64 xxx
Copyright (C) 1985-2007 Intel Corporation. All rights reserved.
hello.c(1): catastrophic error: could not open source file "stdio.h"
#include <stdio.h>
compilation aborted for hello.c (code 4)

It means that the paths of the include, lib and path  for Platform SDK are not correctly set.

There are 2 steps to fix this problem: the changes are in bold.

  1. Edit iclvars.bat and/or ifortvars.bat at %Path_to_Intel_Compiler%
For more complete information about compiler optimizations, see our Optimization Notice.