(p.s. I have a more specific purpose; I'm sharing a semiportable .h file with another project, and I need to #ifdef out some lines when the mex() compiler is used.)
How can I see the command-line options that the mex() command passes to the C compiler?
1 回表示 (過去 30 日間)
古いコメントを表示
I would like to see what command-line the mex() command passes to the C compiler. How can I do this?
回答 (1 件)
Jan
2013 年 8 月 10 日
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 件のコメント
Kaustubha Govind
2013 年 8 月 12 日
The symbol defined by the MEX command by default is:
#ifdef MATLAB_MEX_FILE
// code here
#endif
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!