title: SWIG C++ to Python error: reference to 'XXX' is ambiguous
body: <p>Apologies, I don't really know C++ or SWIG however have been tasked to wrap a complex C++ library using SWIG for Python. I have some test C++ code that uses the library that compiles fine so I know which header files I need, shared libs, tags etc. I first copied the header files from this test code to my interface file and ran swig and g++. swig worked fine (with a collection of warnings) however the first g++ errors I got were</p>
  <pre><code>error: 'FP' was not declared in this scope .... note: 'H::D::FP
  </code></pre>
  <p>There were a few of these so I added them the interface file as</p>
  <pre><code>%{
  #include &lt;header1.h&gt;
  #include &lt;header2.h&gt;
  #include &lt;header3.h&gt;
  .....
  using namespace H::D;
  using namespace A::M;
  
  }
  </code></pre>
  <p>However the next error was</p>
  <pre><code>error: reference to 'SID' is ambiguous
  </code></pre>
  <p>As the class SID is in both the namespaces H::D and A::M. I tried using rename as</p>
  <pre><code>%rename(HD_SID). H::D:SID
  </code></pre>
  <p>but that didn't seem to do anything. How do I resolve this 'ambiguous' issue?</p>
  <p>Thanks and Regards</p>