0

我对动态错误有疑问module does not define init function (initsomething)。当我使用 python 2.7 时一切都很好,问题只出现在使用 python 2.2 编译时输出格式为 .pyd。我的 C++ 代码

#ifndef PyMODINIT_FUNC
#define PyMODINIT_FUNC void
#endif

extern "C" PyMODINIT_FUNC initsomething(void)
{
    (void)Py_InitModule("something", methods);
}
4

0 回答 0