Visual Studio 2010 intellisense not recognising ad

2019-06-22 06:43发布

问题:

I couldn't find a similar question to this on here as it is quite convoluted and I guess more of an annoyance than a major issue. Apologies if this already exists. I have set a system environment variable known as BOOST_ROOT which points to the directory with all the boost headers (in my case this is C:\Program Files (x86)\boost\boost_1_46_1). I assign this as an additional include directory in my visual studio 2010 project properties (by placing $(BOOST_ROOT) in Configuration Properties->C/C++->General->Additional Include Directories). Then in my source I can write the following:

#include <boost\smart_ptr\shared_ptr.hpp>

This compiles and runs okay. My main problem is that when I type the

#include <boost

part the intellisense is not actually finding the boost directory or its subdirectories. Even with the full include statement, intellisense is telling me it can't find the file. This is still the case when I enter the full path to the headers.

I guess this is more of a convenience than anything else as the program still works but I was wondering if anyone had experienced this and managed to resolve it?