title: C# wrapper for DCMTK library using SWIG
body: <p>I want to create C# wrapper for <a href="http://dicom.offis.de/dcmtk.php.en" rel="nofollow">DCMTK</a> library (which is written in C++) using SWIG. I have full source code of <a href="http://dicom.offis.de/dcmtk.php.en" rel="nofollow">DCMTK</a>, but I have one problem I can't solve...</p>
  
  <p>My script for SWIG looks like this:</p>
  
  <pre><code>#ifndef WRAPPER_SWIG_I
  # define WRAPPER_SWIG_I
  %{ 
  %}
  
  %include "include/dcmtk/dcmjpeg/ddpiimpl.h"
  %include "include/dcmtk/dcmjpeg/dipijpeg.h"
  %include "include/dcmtk/dcmjpeg/djcodecd.h"
  #endif
  </code></pre>
  
  <p>Then I run SWIG from command line:</p>
  
  <pre><code>swig -includeall -Wall -c++ -csharp -outdir $(SolutionDir)\dcmjpegcsharp\ -module dcmjpeg -namespace dcmjpeg dcmjpeg.i
  </code></pre>
  
  <p>... and it throws many errors that it is unable to find headers files (which are included inside these listed in the script). For example, header file "include/dcmtk/dcmjpeg/ddpiimpl.h" is including file "dcmtk/config/osconfig.h" which is in completely different location.</p>
  
  <p>The problem is that the C++ headers files in <a href="http://dicom.offis.de/dcmtk.php.en" rel="nofollow">DCMTK</a> library's source code are scattered across multiple folders, and they "don't see each other". 
  Is there a simple solution for that? Maybe to force SWIG to automatically and recursively search for headers files in some root directory of DCMTK source?</p>