I'm trying to generate Boost.Python 1.65.1 libraries with MSVC2015 and Python 3.7.
I'm having this compilation error:
libs\python\src\converter\builtin_converters.cpp(51): error C2440: 'return': cannot convert from 'const char *' to 'void *'
libs\python\src\converter\builtin_converters.cpp(51): note: Conversion loses qualifiers
The associated code (error is on the return) :
void* convert_to_cstring(PyObject* obj)
{
return PyUnicode_Check(obj) ? _PyUnicode_AsString(obj) : 0;
}
It looks like a real error to me. Is there an option in the b2 configuration to make the compiler more flexible on this ?
I used this as information:
https://codeyarns.com/2014/06/06/how-to-build-boost-using-visual-studio/
How to use Boost in Visual Studio 2010
Edit: I don't have this error with boost 1.69.0, but I have to use the 1.65.1
Edit2: They changed this code in 1.69.0:
PyUnicode_Check(obj) ? const_cast<void*>(reinterpret_cast<const void*>(_PyUnicode_AsString(obj))) : 0;