Is it necessary to rebuild mex binary file if c - files are changed again and again?

I am using a MATLAB function in a Simulink model. This function calls the precompiled mex-binary file made up of 4 c files. Every time I make a change in the C file, I have to rebuild the mex-binary file and restart the simulation.
Is there a way I don't have to rebuild the mex binary file everytime? Can I somehow automate the process such that I only make changes in C file, save them and run the simulation again without building mex- binaries ?
Thanks in anticipation.

Answers (1)

You only need to rebuild a .mex that is derived from a .h or .c file you changed.
Are you working with 4 .mex files, or are you building the 4 .c files into a DLL, or are you building 4 object files from the .c files and doing a static link into a single .mex ?

2 Comments

I am building 4 object files from .c files and doing a static link into a single mex by the command - mex x.c y.c z.c a.c.

Sign in to comment.

Categories

Asked:

on 3 Feb 2014

Commented:

on 3 Feb 2014

Community Treasure Hunt

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

Start Hunting!