nick at craig-wood.com
Wed Sep 24 13:30:03 CEST 2008
lixinyi.23 at gmail.com <lixinyi.23 at gmail.com> wrote:
> my code:
> #include <Python.h>
> int main(int argc, char **argv)
> FILE *file_1 = fopen("a2l_reader.py","r+");
> 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?
Run it under gdb (which should have come with MinGW).
Check that you actually opened the file, ie file_1 != 0.
This might be relevant
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick
More information about the Python-list