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