title: Undefined reference to `PyString_FromString'
body: <p>I have this C code:</p>
  
  <pre><code>... [SNIP] ...
  for(Node = Plugin.Head; Node != NULL; Node = Node-&gt;Next) {
      //Create new python sub-interpreter
      Node-&gt;Interpreter = Py_NewInterpreter();
      if(Node-&gt;Interpreter == NULL) {
          Die("Py_NewInterpreter() failed");
      }
  
      //Create path to plugins main source file
      snprintf(Filename, FILENAME_MAX, "%s/main.py", Node-&gt;File);
  
      //Convert filename to python string
      PFilename = PyString_FromString(Filename);
      if(PFilename == NULL) {
          Die("PyString_FromString(%s) failed", Filename);
      }
  
      //Import plugin main source file
      PModule = PyImport_Import(PFilename);
      if(PModule == NULL) {
          Die("PyImport_Import(%s) failed", Filename);
      }
  
      //Deallocate filename
      Py_DECREF(PFilename);
  
      //Get reference to onLoad function from module
      PFunction = PyObject_GetAttrString(PModule, "onLoad");
      if(PFunction == NULL) {
          Die("PyObject_GetAttrString() failed");
      }
  }
  ... [SNIP] ...
  </code></pre>
  
  <p>Which gives this error when compiled:</p>
  
  <pre><code>/tmp/ccXNmyPy.o: In function `LoadPlugins':
  /home/alex/Code/Scribe/Scribe.c:693: undefined reference to `PyString_FromString'
  collect2: error: ld returned 1 exit status
  </code></pre>
  
  <p>Python.h is included at the top of the source file.</p>
  
  <p>I'm compiling with:</p>
  
  <pre><code>gcc -funwind-tables -rdynamic -I /usr/include/python2.7/ -g -o Scribe Scribe.c -lcurses `python-config --cflags` `python-config --ldflags` -Wall
  </code></pre>
  
  <p>I'm basing the code on the Python C-Api docs, from here:</p>
  
  <p><a href="http://docs.python.org/2/c-api/" rel="noreferrer">http://docs.python.org/2/c-api/</a></p>
  
  <p>Specifically:</p>
  
  <p><a href="http://docs.python.org/2/c-api/string.html?highlight=pystring_fromstring#PyString_FromString" rel="noreferrer">http://docs.python.org/2/c-api/string.html?highlight=pystring_fromstring#PyString_FromString</a></p>
  
  <p>I have no idea why this is happening, halp? =c</p>