Alex B.
Alex B.

Reputation: 647

IntelliSense: Cannot open source file in include path

I am authoring a C++ project with Visual Studio 2013 Professional and I encountered a problem I have never encountered before.

In one of my source files I am including a third-party header file like this:

#include 'sqlcli1.h'

This file (and other files of the same set) are located in a an external directory (not in the VS solution), so I have added it to the search path using Additional include paths under project's Properties.

The solution does build succesfuuly, so I am sure my external header file is referenced correctly. IntelliSense, however, still doesn't see it and complains about not being able to open source file 'sqlcli1.h'. It does not prevent me from building the project, but it makes editing it much harder.

Why does this happen and what should I do?

Upvotes: 1

Views: 1593

Answers (2)

Winfred Huang
Winfred Huang

Reputation: 372

Have you tried to delete files related to Intellisense in your solution directory? Go to .vs\(your solution name)\v(VS version)\, delete Browse.VC.db and ipch directory. VS will rebuild the IntelliSense database and it may help solve your problem.

Upvotes: 2

Brian S. Penn
Brian S. Penn

Reputation: 34

Alas, I did everything above but, to no avail. For me the problem is the *.vcxproj file. I took the contents of a working *.vcxproj file and replaced it with the one that didn't work (changing the project name in the *.vcxproj file, of course!!) And, Wowie Zowie!! It works! There is probably a much more elegant solution, but this worked for me. Also, my problem was related to a C1083 error, too.

Upvotes: 0

Related Questions