1

I did see some similar questions about this - but I couldn't piece together what I needed.

I'm using boost in a project in Visual Studio 9, and I'm unable to get it to recognize all the header files that I'm trying to include. I'd installed Boost using the Windows installer that also places the binaries on my machine.

In Visual Studio, I modified the Project->Properties->Linker->Additional Libarary Dependencies to include the folder "mypath\boost_1.44\lib", which contains the binaries - but I still can't get VS to recognize my Boost header files. Please help!

Cheers.

sparkFinder
  • 3,336
  • 10
  • 42
  • 57

1 Answers1

2

edited to clarify some text

You need to modify the project properties to add header locations for the boost headers as well. If you want a global setting, this is how you do it:

Tool->Options->Projects and Settings->VC++ Directories. Then on the right hand side, Open the dropbox labeled "Show Directories For" and pick "Include Files".

Add a new line for your boost header path.

This is a screenshot from VS2008 - it is similar in VS2010 and VS2005.

alt text

Additionally, you can also set these directories on a per-project basis by modifying each project's specific properties.

wkl
  • 77,184
  • 16
  • 165
  • 176
  • You claim it is similar for VS2010; however when I go to `Tool->Options->Projects and Settings->VC++ Directories` I get the message "VC++ Directories editing in Tools>Options has been deprecated. VC++ Directories are now available as a user property sheet that is added by default to all projects." Sounds like a global setting is not possible any more...? – Jonas Heidelberg Jul 20 '11 at 14:01
  • @Jonas - You can still do global in VS2010, it's deprecated in that they will probably remove the feature in VS2012 or whatever the next version is - the alternative is to set each directory on a per-project basis. – wkl Jul 20 '11 at 14:05
  • What I see is this: http://i.stack.imgur.com/5Ko0P.png ... so you are saying there still is a way to set these options? Do I need to go to some kind of compatibility or "advanced options" mode? – Jonas Heidelberg Jul 20 '11 at 18:04
  • @Jonas it's possible but it's a pain, you should really do it on a per-project basis. It's also less error prone not to have system-wide includes – CharlesB Jul 21 '11 at 15:02
  • @Jonas also see [How to use Boost in Visual Studio 2010](http://stackoverflow.com/q/2629421/11343) – CharlesB Jul 21 '11 at 15:07
  • @Jonas, If I specify the include path (say, providing an absolute path) per-poject, will I be able to transfer that project to other machine (or commit a project files to a version control system and then checkout to other machine) without having to modify the path to include directories? I would see the use of (now deprecated) IDE-vide setting to provide the consistent build environment for libraries that are the same everywhere. – Nikita Vorontsov Feb 28 '14 at 13:05