Jeon, I've recently dealt with a similar problem. Chances are that if things are building and installing correctly but the error is in the SWIG import, the actual problem lies in your CMakeLists.txt... seems like the C++ linker is being smart enough to get things linked correctly but SWIG needs you to be a bit more explicit.
Is there another project that includes Reed-Solomon that you can reference? See what changes they made to their CMakesLists.txt to get SWIG to be happy. -Doug ________________________________ From: discuss-gnuradio-bounces+danderson=its.bldrdoc....@gnu.org [discuss-gnuradio-bounces+danderson=its.bldrdoc....@gnu.org] on behalf of Jeon [sjeon87+gnura...@gmail.com] Sent: Sunday, March 29, 2015 10:25 PM To: Discuss GNU Radio mailing list Subject: [Discuss-gnuradio] Swig and python import problem due to other out-of-tree modules used in my out-of-tree module I've asked this question before. But there are lots of ambiguity and uncertainty. Thus, this is the clarification. I am using Reed-Solomon En/decoder in my own OOT module sources. The Reed-Solomon en/decoder are implemented in [gr-dvbt](https://github.com/BogdanDIA/gr-dvbt). Important codes are: [include/reed_solomon.h](https://github.com/BogdanDIA/gr-dvbt/blob/master/include/dvbt/reed_solomon.h) [include/reed_solomon_enc.h](https://github.com/BogdanDIA/gr-dvbt/blob/master/include/dvbt/reed_solomon_enc.h) [lib/reed_solomon.cc](https://github.com/BogdanDIA/gr-dvbt/blob/master/lib/reed_solomon.cc) [lib/reed_solomon_end_impl.h](https://github.com/BogdanDIA/gr-dvbt/blob/master/lib/reed_solomon_enc_impl.h) [lib/reed_solomon_end_impl.cc](https://github.com/BogdanDIA/gr-dvbt/blob/master/lib/reed_solomon_enc_impl.cc) I've built and installed my module. But when I import my module in Python for tests, error occurs: >>> import myOOTmodule Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/myOOTmodule/__init__.py", line 51, in <module> from myOOTmodule_swig import * File "/usr/local/lib/python2.7/dist-packages/myOOTmodule/myOOTmodule_swig.py", line 28, in <module> _myOOTmodule_swig = swig_import_helper() File "/usr/local/lib/python2.7/dist-packages/myOOTmodule/myOOTmodule_swig.py", line 24, in swig_import_helper _mod = imp.load_module('_myOOTmodule_swig', fp, pathname, description) ImportError: /usr/local/lib/libgnuradio-myOOTmodule.so: undefined symbol: _ZN2gr4dvbt12reed_solomonC1Eiiiiiiii You can also see the error above in [gist](https://gist.github.com/gsongsong/e07883959f6a339b5d78) The problem is that the above error occurs since I am using gr:dvbt::reed_solomon, which is neither in GNU Radio source tree nor in my module. I don't know the exact reason for this. But in my guess... It seems that myOOTmodule thinks gr::dvbt::reed_solomon is a part of myOOTmodule itself. But there is no declaration and implementation and it causes the error. Or myOOTmodule has no idea where to import gr:dvbt:reed_solomon. Another hypothesis is that, an OOT module cannot use other OOT modules (in swig-python?). I'm not sure about it. Or, there is a way to do this, but I just don't know about it. Regards, Jeon.
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio