# Using fft::fft\_complex in an out-of-tree moudle

**URL:** <https://www.ruby-forum.com/t/using-fft-fft-complex-in-an-out-of-tree-moudle/242006>\
**Category:** GNU Radio\
**Created:** [May 20, 2015, 4:57am UTC](https://www.ruby-forum.com/t/using-fft-fft-complex-in-an-out-of-tree-moudle/242006 "2015-05-20T04:57:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [May 20, 2015, 4:57am UTC](https://www.ruby-forum.com/t/using-fft-fft-complex-in-an-out-of-tree-moudle/242006/1 "2015-05-20T04:57:02Z")

</div>

Hi all,

I created an out-of-tree module for my personal project.  
In one block, I need to perform FFT and IFFF, so I put “_#include  
\<gnuradio/fft/fft.h\>_” in the header file, and then declare  
\*fft::fft\_complex  
_d\_ifft;_  
​In the .cc file, I wrote _d\_ifft = new fft::fft\_complex(64, false,  
1);​_  
​Then I can compile without any error messages, but when I run a flow  
graph  
to ​test the block, it turns out an error message like this:

Traceback (most recent call last):  
File “/home/van-ly/sandbox/gnuradio-builds/Test/top\_block.py”, line  
15,  
in   
import PNC4TWRN  
File  
“/opt/gnuradio-3.7.3/lib/python2.7/dist-packages/PNC4TWRN/ **init**.py”,  
line 45, in   
from PNC4TWRN\_swig import \*  
File  
“/opt/gnuradio-3.7.3/lib/python2.7/dist-packages/PNC4TWRN/PNC4TWRN\_swig.py”,  
line 28, in   
\_PNC4TWRN\_swig = swig\_import\_helper()  
File  
“/opt/gnuradio-3.7.3/lib/python2.7/dist-packages/PNC4TWRN/PNC4TWRN\_swig.py”,  
line 24, in swig\_import\_helper  
\_mod = imp.load\_module(’\_PNC4TWRN\_swig’, fp, pathname, description)  
ImportError: /opt/gnuradio-3.7.3/lib/libgnuradio-PNC4TWRN.so: undefined  
symbol: \_ZN2gr3fft11fft\_complexC1Eibi

​Could any one please help me with this?  
Does any one know how to use the perform FFT ​in an out-of-tree module?

Thank you in advance,  
Van-Ly

Van-Ly Nguyen,  
Research Assistant,  
Signals and Systems Laboratory - SSL  
Faculty of Electronics and Telecommunications - FET  
University of Engineering and Technology - UET  
Vietnam National University, Hanoi - VNU

Phone: (+84) 97 881 9406

---

<div class="post-metadata">

**Author:** ![NguySSSn\_VSSn\_LS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/9fc29f/32.png) [@NguySSSn\_VSSn\_LS\_S](https://www.ruby-forum.com/u/NguySSSn_VSSn_LS_S)\
**Post date:** [May 20, 2015, 5:32am UTC](https://www.ruby-forum.com/t/using-fft-fft-complex-in-an-out-of-tree-moudle/242006/2 "2015-05-20T05:32:41Z")

</div>

You have to add FFT to the top level CMakeLists.txt file. Like so:

set(GR\_REQUIRED\_COMPONENTS RUNTIME FFT)

Ron

---

<div class="post-metadata">

**Author:** ![NguySSSn\_VSSn\_LS\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/9fc29f/32.png) [@NguySSSn\_VSSn\_LS\_S](https://www.ruby-forum.com/u/NguySSSn_VSSn_LS_S)\
**Post date:** [May 20, 2015, 6:18am UTC](https://www.ruby-forum.com/t/using-fft-fft-complex-in-an-out-of-tree-moudle/242006/3 "2015-05-20T06:18:15Z")

</div>

Thank you Ron,

I got it.

Best Regards,  
Van-Ly

Van-Ly Nguyen,  
Research Assistant,  
Signals and Systems Laboratory - SSL  
Faculty of Electronics and Telecommunications - FET  
University of Engineering and Technology - UET  
Vietnam National University, Hanoi - VNU

Phone: (+84) 97 881 9406
