Cannot open include file 'stdlib.h' in Visual Studio 2010

13,699

I solved the same problem by following steps:

  1. uninstalled Visaul Studio 2010 by the installation DVD.
  2. removed everything about Visaul Studio 2010 by control panel
  3. reinstalled Visual Studio 2010 Pro from DVD. Select full installation.

I felt the key was to uninstall VS by the DVD. I used the control panel to uninstall, then reinstall, but didn't solve the problem. Hopefully this will help some people. In addition, I felt the root cause was another version of Visual Studio. I had VS 2008 before. It worked well. The problem happened after I updated to VS 2010.

Share:
13,699
Steve Rukuts
Author by

Steve Rukuts

Updated on June 07, 2022

Comments

  • Steve Rukuts
    Steve Rukuts about 2 years

    I am attempting to compile a third-party library using Visual Studio 2010 Pro (SP1). Unfortunately I receive this error about 1000 times when I attempt to do so:

    error C1083: Cannot open include file: 'stdlib.h': No such file or directory.

    Searching has lead me to the directory C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC which should contain stdlib.h, but this directory does not contain it. In fact, there is no stdlib.h on my entire computer, although there are plenty of references to it in samples distributed with Visual Studio.

    I haven't used C++ on Windows in a very long time, and even then my usage was hardly advanced so I am unsure what I need to download. I was under the impression that this should work out of the box.

    The library I am attempting to compile (Tesseract) is normally built with Visual Studio 2008. Is there somewhere I can download the header files for this? Searching for Visual C++ SDK only gives me the SDK for making extensions for the IDE.

    I usually use Visual Studio Pro for C# development if that helps to narrow down the issue.