Closed kunzeng-ch closed 2 years ago
Sorry, parse_file
is just an example convenience function. It's the responsibility of the user to invoke the C preprocessor correctly and provide pycparser with preprocessed code. pycparser also has an example of using gcc -E
as the preprocessor, but it really depends on what you have installed on your machine.
Hello! Can you help me? I got the problem: "Unable to invoke 'cpp'. Make sure its path was passed correctly", when I ran the commond: ast = parse_file(filename, use_cpp=True)