How can I see the command-line options that the mex() command passes to the C compiler?
Show older comments
I would like to see what command-line the mex() command passes to the C compiler. How can I do this?
Answers (1)
Jan
on 10 Aug 2013
Try the debugging:
mex -v ...
If the C-file needs to consider a compilation from a mex command, you can explicitly create a flag:
mex -DCalledFromMex ...
And in the C-code:
#ifdef CalledFromMex
1 Comment
Kaustubha Govind
on 12 Aug 2013
The symbol defined by the MEX command by default is:
#ifdef MATLAB_MEX_FILE
// code here
#endif
Categories
Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!