title: Swig enum using values from other library
body: <p>I would like to use Swig to generate C# wrappers for my c++ classes. I am facing the following problem:</p>
  
  <p>I have defined an enum that uses values from a third party (closed source) library.
  The values are declared inside HEADER_FROM_3RD_PARTY_LIB.h as </p>
  
  <pre><code>#define 3RD_PARTY_LIB_CONST_VALUE_1 -4
  #define 3RD_PARTY_LIB_CONST_VALUE_1 -10
  </code></pre>
  
  <p>My header file looks like:</p>
  
  <pre><code>#include "HEADER_FROM_3RD_PARTY_LIB.h"
  
  namespace Foo
  {
      namespace Bar
     {    
      class MyClass
      {       
       public:    
              enum MyEnum
          {           
          Enum1 = 3RD_PARTY_LIB_CONST_VALUE_1,            
          Enum2 = 3RD_PARTY_LIB_CONST_VALUE_2     
          };
          }
      }
  }
  </code></pre>
  
  <p>I am using the following swig code:</p>
  
  <pre><code>%module cpp  
  
  %{  
      #include "MyClass.h"  
  %}  
  
  %include &lt;windows.i&gt;  
  %include "MyClass.h"  
  </code></pre>
  
  <p>The wrapper is successfully generated but the generated csharp file has the following enum generated:</p>
  
  <pre><code>public enum MyEnum
  {           
      Enum1 = 3RD_PARTY_LIB_CONST_VALUE_1,            
      Enum2 = 3RD_PARTY_LIB_CONST_VALUE_2     
  }
  </code></pre>
  
  <p>Obviously this generates an error since C# cannot find the 3RD_PARTY_LIB_CONST_VALUE_1 and 3RD_PARTY_LIB_CONST_VALUE_2 values.</p>
  
  <p>Any ideas who could this be resolved? I had a look at Swig examples but could not find something similar.</p>