I try to let albertz_PyCParser [https://github.com/albertz/PyCParser] run on windows
first of all, I change the TAB to 4 spaces. Then
-
In globalincludewrappers.py, I fixed
libc = ctypes.CDLL('msvcrt.dll')
to insteadlibc = ctypes.CDLL(None)
. Else ctypes complain thatexpected string or Unicode object, NoneType found
-
In globalincludewrappers.py, I fixed something like
fdopen
on windows. But I don't know how to let albertz_PyCParser linkfdopen
in C with_fdopen
-
In demos\test_interpreter.py, I mainly renamed the module name to albertz_PyCParser to overcome the name confliction, since there are at least 2 modules with name PyCParser. So I think it is a too bad habit to name a module with a very popular name.
-
However, demos\test_interpreter.py still cannot run
erros so far: : cannot open local include-file 'E:\msys64\home\LOVLJIDY\albertz_PyCParser\demos/test_interpreter.c': [Errno 22] invalid mode ('rb') or filename: './E:\msys64\home\SOMEBODY\albertz_PyCParser\demos/test_interpreter.c'
PyAST of main: EXCEPTION Traceback (most recent call last): File "E:\msys64\home\SOMEBODY\albertz_PyCParser\cwrapper.py", line 33, in getitem line: raise KeyError(str(k) + " not found in C wrapped state " + str(self)) locals: KeyError = <type 'exceptions.KeyError'> str = <type 'str'> k = 'main' self = CStateDictWrapper([{}]) KeyError: 'main not found in C wrapped state CStateDictWrapper([{}])'