I m looking for an option of the mex compiler in order to produce a static mex file with all the code, that it needs, already inside it. which can substitute all the external references inside my c code with the real code from the external library.
i tried to do that because I created a mex file to put inside a 2ndlevel sfunction block mex file.c -l APP_Numerical and until now everything is fine the program works on Simulink (the option -l is there, because I made some references to an external library)
Then in order to use it in a real time simulator, I need to translate this model with Real-Time Workshop (now Simulink Coder), but when I attempt to do that I get an error from the linker, which cannot find an external reference; i tried to add this library to the matlab path, but it doesn't work, then I fix it adding the static path of this library (.lib) in the option of Real-Time Workshop.
Is that any way to avoid that? I don't work with the same computer all the time, sometimes I need to switch it with other guys. So everytimes that I need to rebuild the library I need to looking for this library inside the new computer and put its path in the option of Real-Time Workshop.
So I was wondering if there is a way to ask to the mex compiler to substitute all the external references with the real code from the external library. In this way instead to produce a dynamic library it will produce a static library with all the code that it needs already inside it.