title: f2py with include files
body: <p>I am compiling a fortran program called prog.f. It contains an include file called test.inc.
  This below runs successfully and shows that my include file is found. I have a prog.so file generated.</p>
  
  <pre><code>f2py -c prog.f -m prog
  </code></pre>
  
  <p>However when I call this module from python I get this error message:</p>
  
  <pre><code>Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
  [GCC 4.6.3] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  &gt;&gt;&gt; import prog
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: ./prog.so: undefined symbol: unknown_function_
  </code></pre>
  
  <p>I suspect something to do with my compilation arguments but I am not too familiar with Fortran. Do I need to include my include file as well? If so how?</p>