MATLAB: C Dll does not find all header paths

cdllheader

P.S.: I should also mention, that I have added all the directories to the search path using
addpath
But still, the files are not found.

Best Answer

You cannot use calllib in matlab unless you have first loaded the library with loadlibrary.
If there is a bunch of include file that are not found because they're in a different folder then you need to tell loadlibrary where to find them, using the includepath option (Not that this is orthogonal to addpath which is for m files). From your description, it looks like includepath should point to whatever ../.. is, so
loadlibrary('C:\Windows\System32\mxsvcb.dll','\apimx\apimx.h', 'includepath', '\apimx\..\..\')
may work.