I am trying to have interface for C++ library for python using boost::python
, my C++ code is using ACE
, now when I include following code
#ifdef BUILD_PYTHON_EXT
#include <boost/python.hpp>
using namespace boost::python;
#endif
it is giving me following error
1>E:\thirdparty\ace.6.1.0_versioned_vc10\ace/ACE.h(150): error C2872: 'ssize_t' : ambiguous symbol
1> could be 'E:\thirdparty\ace.6.1.0_versioned_vc10\ace/os_include/sys/os_types.h(126) : int ssize_t'
1> or 'E:\thirdparty\boost_1_51_0\boost/python/ssize_t.hpp(15) : boost::python::ssize_t'
How do i resolve this error
In this case you should not use using directive. Use namespace python = boost::python
or something else. Or, you should include ACE headers, or something that include ACE headers before using namespace boost::python;
, but first is preferable.