Reputation:
I am using Boost with Visual Studio 2008 and I have put the path to boost directory in configuration for the project in C++/General/"Additional Include Directories" and in Linker/General/"Additional Library Directories". (as it says here: http://www.boost.org/doc/libs/1_36_0/more/getting_started/windows.html#build-from-the-visual-studio-ide)
When I build my program, I get an error:
fatal error C1083: Cannot open include file: 'boost/python.hpp': No such file or directory
I have checked if the file exists, and it is on the path.
I would be grateful if anyone can solve this problem.
The boost include path is C:\Program Files\boost\boost_1_36_0\boost
.
Linker path is C:\Program Files\boost\boost_1_36_0\lib
.
The file python.hpp
exists on the include path.
Upvotes: 1
Views: 3273
Reputation: 247899
Where is the file located, and which include path did you specify? (And how is the file #include
'd)
There's a mismatch between some of these But it's impossible to say what's wrong when you haven't shown what you actually did.
Edit:
Given the paths you mentioned in comments, the problem is that they don't add up.
If the include path is C:\Program Files\boost\boost_1_36_0\boost
, and you then try to include 'boost/python.hpp", the compiler searches for this file in the include path, which means it looks for C:\Program Files\boost\boost_1_36_0\boost\boost\python.hpp
, which doesn't exist.
The include path should be set to C:\Program Files\boost\boost_1_36_0
instead.
Upvotes: 3
Reputation: 99535
How do you include it? You should write something like this:
#include <boost/python.hpp>
Note that Additional Include Directories
settings are differs in Release
and Debug
configurations. You should make them the same.
If boost placed to C:\Program Files\boost\boost_1_36_0\
you should set path to C:\Program Files\boost\boost_1_36_0\
without boost
in the end.
Upvotes: 2