Sandeep
Sandeep

Reputation:

What is the diff b/w Includes in VC++ Directories options and Additional include directories in C++ -> General in Visual Studio

I tried adding the include directories in the VC++ Directories -> Include Directories option in Tools -> Options but when compiling I get error - "Can't find file or directory" . Once I add to the Project properties -> Configuration properties -> C++ -> General -> Additional include directories , I could compile successfully.

So why does Visual Studio have a Include Directories option. Why is it used for ? (I'm using Visual studio 2010 Beta 1 )

Upvotes: 8

Views: 5026

Answers (4)

Abhay
Abhay

Reputation: 7190

I think you mean "VC++ Directories" in Tools->Options->Projects.

The directories listed here are visible in the entire VS environment (common to all projects). That is it consists of the path to use when searching for executable files while building a VC++ project. So ,

  • you cannot specify paths relative to the location of project files. One should avoid this option IMHO.

  • Listing the paths in project setting also makes it more configurable as these directiories are considered when compiling through command-line also. Most major projects have automated builds through command-line, so they would fail to build if the directories are not listed in the project properties.

Upvotes: 0

Jagannath
Jagannath

Reputation: 4025

http://msdn.microsoft.com/en-us/library/t8096eby(VS.100).aspx

Please refer to this document.

Upvotes: -1

msvcyc
msvcyc

Reputation: 2603

Include directory under tools is common for all projects. This is where your includes for the Windows SDK is listed which is almost used by all the projects. The include directory under C++ tab is specific to that project. This is where you list all your custom project include files.

Upvotes: 1

haffax
haffax

Reputation: 6008

Visual Studio team recently explained differences of VS 2010 regarding include directories to earlier versions in their blog. You should find your answer here: http://blogs.msdn.com/vsproject/archive/2009/07/07/vc-directories.aspx

Upvotes: 6

Related Questions