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!