MATLAB: How to compile “mex” file linking with dll from matlab

ccompiledllmex

Hi,
I have a solution on MS VS that includes 2 projects. First – mex component (MyDllMex.cpp) and second dll (myDll.cpp). Mex component uses functional provides by dll. I haven't problem to build solution from IDE. But how I should build my solution from matlab. Which command I should use ? I can compile mex component using mex:
mex - MyDllMex.cpp
But how build mex component and dll together from matlab
Related Question