views:

156

answers:

1

Hi,

I am trying to link some Boost .hpp files with Monodevelop, but I don't know how to tell the IDE where Libraries are.

If I want to include the array.hpp file, I write #include<directories/array.hpp>, but because this file makes calls to other files, and the directories to those files in the array.hpp file are only /boost/somefile, there are several path errors. What can I do? Thanks in advance.

+3  A: 

For libraries like Boost you'll need to add the path to the includes/libraries in your project configuration.

In MonoDevelop this can be done by choosing Project->Options->Configurations, then choose the appropriate build type (you'll probably want to edit both Debug and Release eventually), and then Code Generation->Paths.

The Library section is for your built libraries, if any, and the Include section is for stuff like headers and includes.

In this particular case you'll want to add /usr/local/boost to the Include section (change the path as necessary).

Once you've done that, you should be able to use Boost like so:

 #include <boost/array.hpp> // make sure you use angle brackets
richardwb
Thank you!!! It works perfectly