title: How to create Qt-based Library That Can Be Called from C
body: <p>I'm trying to build a simple library that uses some of Qt's functionality (no event loop, just some image manipulation and file loading) and then call that library from a standard <code>C</code> program. I've reviewed the answer <a href="https://stackoverflow.com/a/6533534">here</a>, but the answer did not provide enough information for me to resolve the problem. I have built the library as a static library to be linked, and wrapped the function calls with <code>extern "C"</code>, but I get a bunch of errors, starting with <code>/usr/include/QtCore/qnamespace.h:-1: In function ‘QT_MODULE’:/usr/include/QtCore/qnamespace.h:54: error: unknown type name ‘namespace’.</code></p>
  
  <p>Does anyone have a short tutorial on linking to Qt libraries from a <code>C</code> program?  FYI, everything is under Linux (Fedora 15), and both the <code>C</code> program and the Qt library are being built with <code>QtCreator</code>.</p>