Search code examples
pythonwindowspycparser

Including Fake-headers via pycparser in Windows?


We can support new typedefs , #includes and #defines , by preprocessing it with the help of pycparser parse_file . I also went through the documentation: README page and the blog post , but all the documentation was written for linux systems.I have no clue about linux systems and would love to get the documentation for windows.


Solution

  • The documentation is one and the same. You cannot effectively use pycparser without a basic understanding of how the C compilation pipeline works - sorry!

    The documentation actually addresses Windows directly. The only difference is that instead of relying on a system C compiler (on Linux) you have to explicitly download one for Windows - and the documentation even gives you a link. Once you download Clang for Windows, which gives you preprocessing on Windows, everything else is platform-agnostic.