The last of the 3 issues (link failure) I sorted out by switching the example source code at the URL I provided to one that seems to work for 3.6.1:
#include <Python.h>
static PyObject* helloworld(PyObject* self) {
return Py_BuildValue(“s”, “Hello, Python extensions!!”);
}
static char helloworld_docs[] =
“helloworld( ): Any message you want to put here!!\n”;
static PyMethodDef helloworld_funcs[] = {
{“helloworld”, (PyCFunction)helloworld,
METH_NOARGS, helloworld_docs},
{NULL}
};
static struct PyModuleDef HelloWorldDef =
{
PyModuleDef_HEAD_INIT,
“helloworld”, /* name of module /
“usage: whatever\n”, / module documentation, may be NULL /
-1, / size of per-interpreter state of the module, or -1 if the module keeps state in global variables. */
helloworld_funcs
};
PyMODINIT_FUNC PyInit_helloworld(void)
{
return PyModule_Create(&HelloWorldDef);
}