title: Linking MATLAB to a DLL library
body: <p>I am trying to execute some example code from a MATLAB toolkit, '<a href="http://sourceforge.net/projects/oscmex" rel="noreferrer">oscmex</a>'. This toolkit allows for communication using the OSC protocol over MATLAB. I presume this question is non-specific; it should apply to <em>any</em> toolkit that is set-up in the manner that this one is.</p>
  
  <p>Reasons aside, I'm having some simple trouble getting the toolkit up and running. The toolkit comes with no documentation whatsoever; just a set of six DLL files (in one directory), and a set of four MATLAB '.m' example code files (in another directory). Every toolkit I've used in the past has either been a built-in kit or has had an intuitive (semi-automated) install procedure.</p>
  
  <p>After downloading the toolkit, the first thing I tried was to simply run one of the '.M' example codes. This failed as the first line of the code contained the function <em>osc()</em>, which is not (currently) recognised by MATLAB.</p>
  
  <p>So, I figured maybe I need to move the '.M' files into the same folder as the DLLs; perhaps MATLAB would see the functions inside the DLLs. No dice.</p>
  
  <p>So, I realise that I have to somehow link MATLAB to the DLLs on startup. I tried adding the DLLs to a folder and adding an entry to that in the 'pathdef.m' file. This also failed.</p>
  
  <p>I've read somewhere I can load a DLL file by using the <em>loadlibrary()</em> function. So, I tried doing this for the DLL files. This failed on the first file:</p>
  
  <pre><code>&gt;&gt; loadlibrary('osc_free_address.dll')
  
  Error using loadlibrary&gt;lFullPath (line 587)
  Could not find file osc_free_address.h.
  </code></pre>
  
  <p>I'm starting to run out of options... How can I get this set of DLLs up and running?</p>