フィルターのクリア

mex -output option not recognized

5 ビュー (過去 30 日間)
syl1446
syl1446 2018 年 5 月 15 日
コメント済み: syl1446 2018 年 5 月 15 日
When trying to compile a c++ project using the following call to the mex function:
mex('-output my_program', '-DSOME_MACRO1', '-DSOME_MACRO2', '-I/usr/local/include', '-L/usr/local/lib', '-lsome_lib', src_files{:}, 'lib1.a', 'lib2.a')
where
src_files = {'file1.cpp', 'file2.cpp', 'file3.cpp'};
I get the error "Unknown MEX argument '-output my_program'." The compilation works fine without the '-output my_program' option and a file file1.mexmaci64 is created but I then have to manually rename it.
Why do I get an error with the -output option ?

採用された回答

James Tursa
James Tursa 2018 年 5 月 15 日
Try splitting up the output argument, e.g.,
mex('-output','my_program',...etc
  1 件のコメント
syl1446
syl1446 2018 年 5 月 15 日
That works. Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by