You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
crashed when calling PythonQtObjectPtr::evalFile with a local disk file #10
I compiled PythonQt with mingw-g++ 7.3.0, and python 2.7 which I am not sure with the compiler(mostly it is vc). Everything works fine, except crashed when I tried to call PythonQtObjectPtr::evalFile like evalFile("example.py").
I googled and found this post, https://sourceforge.net/p/pythonqt/discussion/631393/thread/65f9a4af/, it seems a known issue but has not resolved.
Any update on it? or any standard solution for this issue?
The origin of the problem is in FILE* data structure. Python is compiled with MSVC and it has different assumptions about FILE memory representation against MinGW's gcc.
This happens in the PythonQtImport::writeCompiledModule, where corresponding Py_WriteXXX methods which expect FILE* are used.
One can use mingw's libpython to workaround this. Probably, there are other solutions.
Activity
iakov commentedon Aug 4, 2020
The origin of the problem is in
FILE*data structure. Python is compiled with MSVC and it has different assumptions aboutFILEmemory representation against MinGW's gcc.This happens in the
PythonQtImport::writeCompiledModule, where correspondingPy_WriteXXXmethods which expectFILE*are used.One can use mingw's
libpythonto workaround this. Probably, there are other solutions.