title: Including a somewhat large C library in Cython
body: <p>I'm very new to Cython, and know the basics of C/C++ compilation.</p>
  
  <p>Here's what I'm trying to do:</p>
  
  <p>There is a decently large library written in C that I want to incorporate in my Python program. (In particular, it's the implementation of board logic for GNUGo. I'm experimenting with building AIs for it.) I need this routine to be fast, and using a Python implementation of the logic has been too slow.</p>
  
  <p>The Cython documentation says that I should create a <code>.pxd</code> file that lists method signatures that are defined extern from the <code>.h</code> files. I should then create a wrapper class in the corresponding <code>.pyx</code> file, and manually create Python-side function calls that hook into the method signatures listed above.</p>
  
  <p>The issue I have is that the library I want to implement isn't a single C file like the documentation example. It uses multiple C files, with their own interdependencies, and the game board is represented as a set of global variables that are defined extern all over the place. I really, really don't want to write <code>.pxd</code>s for all the required C files. </p>
  
  <p>The GNUGo documentation suggests that I can create a <code>libboard.a</code> file - is this conceptually different from a <code>.o</code> file, and is there a way to include this file into Cython? I ideally want to treat it as a blackbox that lets me do a method call, have the library deal with its crazy global variable nuttiness, and return the desired output.</p>