I am following this doc on extending c++ to python. As far as what was demonstrated there, the PyObject *spam_system(PyObject *self, PyObject *args) {...} works fin
PyObject *spam_system(PyObject *self, PyObject *args) {...}