recompile codegen C code with mex

With codegen, I can get the executable mex files directly, which is a quite nice feature. However, during development, I may need to use 'codegen' to generate C codes from the .m files and make modification in C. I wonder is there an easy way to recompile the modified C codes and get the executable mex files?
What confuses me is that codegen will create a whole bunch of auxiliary files in addition to the .c files. I guess some files may contain the mex compilation configuration that I can use directly.
Thanks~

 採用された回答

Kaustubha Govind
Kaustubha Govind 2011 年 5 月 12 日

1 投票

There is usually a .bat (or shell script on Linux) that sets up environment variables and runs a makefile (also generated to the same directory). If you modify the source code, simply running the batch/shell script will recompile the binaries. On R2011a, the relevant files are in codegen/mex/<filename>/ and named <filename>_mex.bat and <filename>_mex.mk

1 件のコメント

Hanjie
Hanjie 2011 年 5 月 13 日
Thanks a lot!!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB Algorithm Acceleration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by