I have VS 2010 installed on my system and i was trying to compile a simple hello.c in VS command prompt. The compilation gave an error.
Fatal Error C1083: Cannot open include file: 'stdio.h' no such file, folder exist
Why this error is coming ?? Does VS2010 not include reference files/assemblies for C.
VS 2010 certainly does contain the standard headers. You should check that your command prompt environment is set up correctly. There should be an environment variable named
INCLUDEthat has a directory similar to the cfollowing (among other directories) in it:that directory (the name may vary slightly, for example depending on if your machine is a 64-bit OS of not) should include
stdio.hIf you don’t have such a directory in your environment, then you’re not setting up the environment correctly. You should use on of the “Visual Studio Command Prompt” shortcuts that VS installs, or simply run
With the appropriate parameter to get the environment you want (
x86oramd64for example).If the
INCLUDEenvironment variable does have an entry like that, but thestdio.hfile doesn’t exist, then you might need to reinstall VS.