embedding wxPython in VisualStudio 2005 C/C++ fails
问题 When I try to embed python wx in C like this: #include "stdafx.h" #ifdef _DEBUG #undef _DEBUG #include <Python.h> #define _DEBUG #else #include <Python.h> #endif int _tmain(int argc, _TCHAR* argv[]) { PyObject* pyModule; Py_Initialize(); //_pyModule = PyImport_ImportModule("__main__"); //_pyModule = PyImport_ImportModule("csi"); pyModule = PyImport_ImportModule("wx"); if(!pyModule) PyErr_Print(); return 0; } it fails: ->Traceback (most recent call last): File "C:\Python27\lib\site-packages\wx