简体   繁体   中英

Header files iostream not found Visual Studio 2010

I installed visual studio 2010 ultimate version and everything worked perfectly fine and my development environment worked well.

However I had a recent problem in which every piece of code gives me the error about header files not being found like iostream stdio.h conio.h etc.

I pinpointed the problem to it being caused by me uninstalling visual C++ express 2010 that I had installed previous to the installation of the visual studio 2010.

I tried to completely uninstall and install Visual Studio but it seems some files are always left that I cannot track. I used this link and the answer marked right over there to no avails. Can anybody advise me how to get it right without formatting the whole system.

Link to Question

I seem to have solved the problem using another answer on Stack overflow. The answer points to this link from Microsoft Connect.

The steps I followed to solve the problem are listed below.

  • Uninstalled visual c++ using the following vs2010_uninstall tool from Microsoft and used the switches /full /netfx while uninstalling(use command line instead of double click) as follows: VS2010_Uninstall-RTM.ENU.exe /full /netfx
  • Uninstall Visual Studio Service Pack 1 if its installed
  • Start Registry Editor in Windows: Win+R type Regedit to open Registry Editor. Do remember to backup your registries and create a restore point.
  • Search for the key named PaddedVersion
  • If the search key is found and look at keys ending with VisualStudio\\10.0\\VC\\Libraries or VisualStudio\\10.0_Config\\VC\\Libraries
  • Delete all keys and subkeys under the VisualStudio\\10.0\\VC\\Libraries or if that doesn't work delete all keys and subkeys under VisualStudio\\10.0 or VisualStudio\\10.0_Config . The catch here is that all keys must be deleted regardless of their prefix to the above mentioned string as HKEY_LOCAL_MACHINE or HKEY_USERS etc. It has to be deleted in all cases.
  • Note the PaddedVersion just helps you in finding all such keys.
  • Once done restart(not compulsory but better if you do it) Windows. Now you are ready to begin re-installation of your version of Visual Studio 2010.
  • Hope it helps all who are having such a problem..

    After trying this, and countless other solutions over the past six months, the solution that worked for me was as follows:

    1) Right Click project

    2) Select Properties

    3) Select Configuration Properties > General > Platform Toolset

    4) When you get to Platform Toolset, click on the v110 value which will be in the right column. You will see a drop down appear which will allow you to select v90, v100, or inherit. Of course, v100 is the correct answer. Once v100 is selected, I don't believe you can back to v110 from within VS 2010. You would have to once again open in in VS 2012 to move it back to v110.

    The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

     
    粤ICP备18138465号  © 2020-2024 STACKOOM.COM