要求mex为#include文件使用几个目录

Ame*_*ina 7 matlab

我在这里阅读MATLAB的mex文档如下:

-Ipathname:将路径名添加到文件列表以搜索#include 文件.切换后请勿添加空格.

如何让mex使用多个包含文件夹?我是否将它们作为-Ipath1 -Ipath2等提供?

Pra*_*ian 11

是; 例如:

mex -Iinclude/path/one -Iinclude/path/two -I"include/path/with spaces" mymexfile.c 
Run Code Online (Sandbox Code Playgroud)