I would like to bind a C++-function with PyBind11. The problem is that this functions has an argument with a double pointer and the compiler raises an error
error: cannot initialize a parameter of type 'char **' with an rvalue of type 'typename make_caster<char **>::cast_op_type<typename std::add_rvalue_reference<char**>::type>' (aka 'char *')
.
Specifically the code look like this:
#include <pybind11/pybind11.h>
#include <iostream>
namespace py = pybind11;
void parse_args(int argn__, char** argv__)
{
for(int i = 1; i < argn__; ++i)
{
std::cout<< argv__[i];
}
}
PYBIND11_MODULE(argv_bind, m) {
m.def("parse_args", &parse_args);
}