Trouble Creating a UHD Sink

I have the correct ordering in my swig file, but am still getting these
errors when I try to import my module in Python. The C++ code compiles
fine, but I cannot even import the directory in a Python file.

Traceback (most recent call last):
File “sink_test_gui.py”, line 10, in
import radar2
File “/usr/local/lib/python2.7/dist-packages/radar2/init.py”, line
45, in
from radar2_swig import *
File “/usr/local/lib/python2.7/dist-packages/radar2/radar2_swig.py”,
line
26, in
_radar2_swig = swig_import_helper()
File “/usr/local/lib/python2.7/dist-packages/radar2/radar2_swig.py”,
line
22, in swig_import_helper
_mod = imp.load_module(’_radar2_swig’, fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-radar2.so: undefined symbol:
_ZN3uhd4usrp10multi_usrp9ALL_GAINSE

On 03/26/2013 12:43 PM, Brooke H. wrote:

File “/usr/local/lib/python2.7/dist-packages/radar2/radar2_swig.py”, line
26, in
_radar2_swig = swig_import_helper()
File “/usr/local/lib/python2.7/dist-packages/radar2/radar2_swig.py”, line
22, in swig_import_helper
_mod = imp.load_module(’_radar2_swig’, fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-radar2.so: undefined symbol:
_ZN3uhd4usrp10multi_usrp9ALL_GAINSE

Can you confirm that the swig library is linked against libuhd.so?

You might have something like this in your cmakelists.txt

link_directories(${UHD_LIBRARY_DIRS})
set(GR_SWIG_LIBRARIES gnuradio-uhd ${UHD_LIBRARIES})

-josh

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs