legacy_code : How to set the mex option to -I when calling legacy_cod​e('compile​',def);

2 次查看(过去 30 天)
When I call the legacy_code function with the 'compile' argument, I have an error saying that the files cannot be found.
Moving the files from their original location to the current folder prevents this error from happening but I don't want to put all my header and source files in the same folder. Said files have been added to the Matlab Path without successs.

采纳的回答

Yuebin Zhou
Yuebin Zhou 2017-5-25
Check out this documentation page:
you can specify all compiler options supported by mex in compilerOptions input argument.
  1 个评论
Franck Yin
Franck Yin 2017-5-29
编辑:Franck Yin 2017-5-31
So I what I need is :
legacy_code('compile',def,PATH_TO_MY_HEADERS_FOLDER);
Edit : This also works :
def = legacy_code('initialize');
def.IncPaths = {PATH_TO_MY_HEADERS_FOLDER};

请先登录,再进行评论。

更多回答(0 个)

类别

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