Why does the Python/C API crash on PyRun_SimpleFile?

后端 未结 7 697
一整个雨季
一整个雨季 2020-12-15 07:45

I\'ve been experimenting with embedding different scripting languages in a C++ application, currently I\'m trying Stackless Python 3.1. I\'ve tried several tutorials and exa

相关标签:
7条回答
  • 2020-12-15 08:35

    This sounds like a problem of mismatched APIs. If your code and the Python runtime were compiled with different compilers, or even different compiler options, then accessing the FILE* could result in an access violation. Can you double-check that you've build your C code properly?

    You mention that you're embedding Python into your C++ application. Keep in mind that Python is C code, compiled as C code. Perhaps that is the source of the problem?

    0 讨论(0)
提交回复
热议问题