my code:
main.cpp
#include <Python.h>
int main(int argc, char **argv)
{
Py_Initialize() ;
FILE *file_1 = fopen("a2l_read er.py","r+");
PyRun_SimpleFil e(file_1,"a2l_r eader.py");
Py_Finalize();
}
compile under windows using MinGW:
g++ main.cpp libpython25.a -o a
no error was found. But when I run a.exe the program just crashes.
What should I do?
main.cpp
#include <Python.h>
int main(int argc, char **argv)
{
Py_Initialize() ;
FILE *file_1 = fopen("a2l_read er.py","r+");
PyRun_SimpleFil e(file_1,"a2l_r eader.py");
Py_Finalize();
}
compile under windows using MinGW:
g++ main.cpp libpython25.a -o a
no error was found. But when I run a.exe the program just crashes.
What should I do?
Comment