discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Out of Tree linker error... libgnuradio-MYMOD.so:


From: John Murphy
Subject: Re: [Discuss-gnuradio] Out of Tree linker error... libgnuradio-MYMOD.so: undefined reference to `gr::fft::fft_complex::execute()'
Date: Thu, 24 Jul 2014 10:02:07 -0400

> On Wed, Jul 23, 2014 at 4:24 PM, John Murphy <address@hidden> wrote:

> > I am getting a link error when making my Out-of-Tree module.

> > This Out of Tree module was done with gr_modtool and cmake following
> > http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules

> > address@hidden build]$ make
> > Scanning dependencies of target gnuradio-comso
> > [  7%] Building CXX object 
> > lib/CMakeFiles/gnuradio-comso.dir/ofdm_rx_impl.cc.o
> > Linking CXX shared library libgnuradio-comso.so
> > [ 14%] Built target gnuradio-comso
> > Linking CXX executable test-comso
> > libgnuradio-comso.so: undefined reference to 
> > `gr::fft::fft_complex::execute()'
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [lib/test-comso] Error 1
> > make[1]: *** [lib/CMakeFiles/test-comso.dir/all] Error 2
> > make: *** [all] Error 2
> > address@hidden build]$

hey! I think I found it! including this for reference if someone ever has 
similar issue.

in the wiki page...
http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModulesConfig
...it says...
"Often times, just knowing where the runtime library and headers are, like 
libgnuradio-runtime.so and gnuradio/block.h, is often enough. But more 
complicated blocks might use other parts of the GNU Radio system, like FIR 
filter kernels or FFT blocks, and so we'll also need to know where to find 
libgnuradio-filter.so, libgnuradio-fft.so, and their various header files."

most of the items in that wiki are covered just by using version 3.7, but there 
is one little piece that I did not quite grok before when I was doing my other 
simpler block...
"If we look in the top-level source directory of our OOT module, 
gr-howto/CMakeLists.txt"
"This only looks for libgnuradio-runtime and the include directories but will 
not allow us to find or use any other GNU Radio libraries. Instead, we want to 
comment this line out and use these lines instead:"
"set(GR_REQUIRED_COMPONENTS RUNTIME FILTER)"

now... this is example in the wiki is for when you are linking against the 
filter module classes, 3.7 actually makes part of this change by having the 
set() with the RUNTIME but it does not have anything else by default, as the 
wiki says.

so all I had to do was at this point of this file I had to change...
set(GR_REQUIRED_COMPONENTS RUNTIME)
...to...
set(GR_REQUIRED_COMPONENTS RUNTIME FFT)

I should also mention that I still get the ->execute() linker error trying to 
use the fft_impl_fft_complex directly instead of thru the gr::fft::fft_complex 
wrapper. Probably there is an issue with the way I downloaded and edited the 
fft_impl_fft.h file or the cmake system definitions are just not set up to do 
that. Anyhow, that is fine as long as I can use gr::fft::fft_complex.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]