title: SWIG/CMAKE build problems, trying to install and use new module in GNURadio
body: <p>I'm trying to make a copy of the USRP Source block included in the UHD module of GNURadio, so that I can freely modify the <code>work()</code> function. </p>
  
  <p>For the moment, I'm just trying to make a block that works exactly like the "USRP Source" block. I made a new module called "asat", created the <code>.cc</code>, <code>.h</code>, <code>.xml</code>, <code>CMakeLists</code>, and <code>__init__</code> files, and got the whole thing to compile and install without an error.</p>
  
  <p>However, when I try and run the GRC .py file, I get the following error:</p>
  
  <pre><code>File "/usr/local/lib/python2.7/dist-packages/asat/__init__.py", line 128, in &lt;module&gt; _prepare_asat_swig()
  File "/usr/local/lib/python2.7/dist-packages/asat/__init__.py", line 32, in _prepare_asat_swig import asat_swig
  File "/usr/local/lib/python2.7/dist-packages/asat/asat_swig.py", line 26, in &lt;module&gt; _asat_swig = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/asat/asat_swig.py", line 22, in swig_import_helper _mod = imp.load_module('_asat_swig', fp, pathname, description)
  ImportError: /usr/local/lib/python2.7/dist-packages/asat/_asat_swig.so: undefined symbol: /ZTIN3uhd9key_errorE
  </code></pre>
  
  <p>I've been tearing my hair out trying to resolve the error, and from my googling I suspect it's an issue of libraries not being linked correctly in CMAKE, but I'm new to SWIG/CMAKE and I can't seem to resolve it.</p>
  
  <p>I would really appreciate any help troubleshooting the cause of the error, if I'm on the right track with the libraries, even if someone could suggest a library to link to.</p>
  
  <p>I've made <a href="https://github.com/JoelSpark/gr-asat" rel="nofollow">a github repo with my source and build directories</a> for anyone willing to help me out.</p>