diff --git a/playground/swig/embed/src1.cpp b/playground/swig/embed/src1.cpp index 25f84820..a760dc7b 100644 --- a/playground/swig/embed/src1.cpp +++ b/playground/swig/embed/src1.cpp @@ -3,7 +3,11 @@ extern "C" { +#if PY_VERSION_HEX >= 0x03000000 + void PyInit__swigdemo(void); +#else void init_swigdemo(void); +#endif } TestClass* TestClass::_instance = 0; @@ -11,7 +15,11 @@ TestClass* TestClass::_instance = 0; int main() { Py_Initialize(); +#if PY_VERSION_HEX >= 0x03000000 + PyInit__swigdemo(); +#else init_swigdemo(); +#endif /*FILE* file_py; file_py = fopen(i_oFile.toLocal8Bit(), "r");