I want to get the preprocessor output when compiling my c-code through mex of MATLAB using MinGW64 Compiler (C) so using gcc (right?). From this post I got that you can do this with pure gcc passing the option -E to gcc. However I installed gcc through MATLAB app and therefore cannot access it through command line (would also appreciate a command how to do that, without reinstalling MinGW64 and setting it up manually for use with MATLAB).
I tried to do the following assuming that compiler flags are the right way to pass the argument:
mex -c grampc_run.c -I../../include -I../include COMPFLAGS='$COMPFLAGS -E'
This just results in the creation of the object file.