There are many cases where you need to see the output file of the GCC preprocessor to debug the code or error caused by macro or any preprocessor directive.
To solve this, you need to see the output file of the GCC after preprocessor.
To get it, you just need to give command:
Here I have taken main.c as a source file, you need to give your source file as an input to this command.
Then you can see the output file which has actually replaced the preprocessor directive with actual content.
If this does not work then Try:
gcc -P main.c
gcc -EP main.c
gcc /E main.c
gcc /P main.c
gcc /EP main.c
To solve this, you need to see the output file of the GCC after preprocessor.
To get it, you just need to give command:
- GCC -E main.c
Here I have taken main.c as a source file, you need to give your source file as an input to this command.
Then you can see the output file which has actually replaced the preprocessor directive with actual content.
If this does not work then Try:
gcc -P main.c
gcc -EP main.c
gcc /E main.c
gcc /P main.c
gcc /EP main.c
0 comments :
Post a Comment