error C2653: 'boost' : is not a class or namespace name VC++ 2008 express
boost-python, visual-c++
Solution
Due to some oddities in how Microsoft's precompiled headers work, you always want the:
#include "stdafx.h"
...as the firsts line in any file where you use it. Any other header needs to come after that, so you want:
#include "stdafx.h"
#include <boost/python.h>
Problem
I try to build simple hello world with boost python and visual c++ 2008 express. I included path `E:\Program Files\boost\boost_1_47\` inside `|Tools|Options|VC++ Directories|` for Include files (and tried to put same path to all other), but i still get error `'boost' : is not a class or namespace name` source code is: ``` #include <boost/python.hpp> #include "stdafx.h" using namespace boost::python; int main( int argc, char ** argv ) { try { Py_Initialize(); object main_module(( handle<>(borrowed(PyImport_AddModule("__main__"))))); object main_namespace = main_module.attr("__dict__"); handle<> ignored(( PyRun_String( "print \"Hello, World\"", Py_file_input, main_namespace.ptr(), main_namespace.ptr() ) )); } catch( error_already_set ) { PyErr_Print(); } } ```