title: Swig a subset of C module while ignoring the rest of the module with other dependencies
body: <p>I have a my.c file that defines function "foo" and "bar", where "foo" is standalone by itself and "bar" calls other functions, say "gee", defined in a bunch of other files that I don't want to be swigged.</p>
  
  <p>Now I want to use Swig to wrap "foo" from my.c, without involving other files or functions. I defined a swig interface for foo:</p>
  
  <pre><code>%module sample                                                                                       
  %{                                                         
  /* Put headers and other declarations here */                                                       
  extern float    foo();                                            
  %}                                                                                                             
  extern float    foo();
  </code></pre>
  
  <p>I was able to build the _my.so library, but when I try to call "foo" from python, it says:</p>
  
  <p><strong>ImportError: _my.so: undefined symbol: "gee".</strong></p>
  
  <p>And if I remove the definition of "bar" from my.c, the whole thing works.</p>
  
  <p>Is there a way to tell swig to ignore "bar" and "gee"? I even tried to add "%ignore bar;" and "%ignore gee;" in the interface, and they don't solve the issue.</p>
  
  <p>Thanks!</p>