Intellisense cannot open source file "*.h"
Asked Answered
A

2

8

I have no idea as to what may have happened. I was removing a few libraries I added to the VC folder and from Additional Dependencies (OpenGL libraries I've added), then when I tried to compile my program, I received 100 errors. The problem is that my current project is not recognizing some of the standard headers. Here is what I've got:

#include <Windows.h>    <-----Error from title
#include <stdio.h>      <-----Error from title
#include <stdlib.h>     <-----Error from title
#include "stdafx.h"     <-----OK
#include <CommCtrl.h>   <-----Error from title

I've created a new project to compare it's properties, but didn't notice anything missing. Does anyone have an idea as to why project isn't using these headers?

Annadiane answered 11/6, 2013 at 8:6 Comment(3)
Under Configuration Properties, what all things you modified?Amund
@rajraj I was just removing OpenGL libraries within the Input and GLew 1.9.0 from the include and libraries options within the VC++ directories. Prior to all this, the program was running fine.Annadiane
OK. Make sure you have all these paths under VC++ directories->Include Directories: $(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);Amund
A
15

Make sure you have all these paths under VC++ directories->Include Directories:

$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(WindowsSDK_IncludePath);‌​

Amund answered 11/6, 2013 at 8:30 Comment(1)
You can find this option in the project properties, as noted here: msdn.microsoft.com/en-us/library/Ee855621%28v=vs.110%29.aspxRibonuclease
P
2

Just an update on previous answer, in VS2015, the previous method of including directories has been deprecated. Its now done on a per-solution basis. In the solution explorer right click your Project Name, then select properties, the dialog that opens up is similar to older VS. Add the paths as suggested above to the include directories and away you go.

Pesthole answered 18/1, 2016 at 21:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.