diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c index b007f4ac6b..2737e5863a 100644 --- a/src/pl/plpython/plpython.c +++ b/src/pl/plpython/plpython.c @@ -4026,7 +4026,13 @@ PLy_add_exceptions(PyObject *plpy) } #if PY_MAJOR_VERSION >= 3 -static PyMODINIT_FUNC +/* + * Must have external linkage, because PyMODINIT_FUNC does dllexport on + * Windows-like platforms. + */ +PyMODINIT_FUNC PyInit_plpy(void); + +PyMODINIT_FUNC PyInit_plpy(void) { PyObject *m;