How do I compile a MEX file from a source file that is not located in my current working directory?
조회 수: 4 (최근 30일)
이전 댓글 표시
I am able to compile my MEX file (myMexFile.c) present in the current working directory successfully using the MEX command.
However when I attempt to compile the same MEX file after moving it to a different location on my system using the following command:
mex myMexFile.c
I receive the following error message:
C:\PROGRA~2\MATLAB\R2007B\BIN\MEX.PL: Error: 'myMexFile.c' not found.
??? Error using ==> mex at 208
Unable to complete successfully.
채택된 답변
MathWorks Support Team
2009년 9월 11일
It is possible to compile source MEX files located in any folder on your system. To do this, you would have to specify the full path to the source file. For example, if your current working directory is
C:\matlab\work
and your source file (mexMexFile.c) is present in
C:\test
execute the MEX command as shown below to compile this file.
mex C:\test1\myMexFile.c
The output MEX file will be created in your current working directory.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!