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 个评论
Jason S
Jason S 2013-8-9
(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.)

请先登录,再进行评论。

回答(1 个)

Jan
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

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by