[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Out of Tree linker error... libgnuradio-MYMOD.so:
Re: [Discuss-gnuradio] Out of Tree linker error... libgnuradio-MYMOD.so: undefined reference to `gr::fft::fft_complex::execute()'
Wed, 23 Jul 2014 17:45:30 -0400
On Wed, 23 Jul 2014 16:33:50 -0400 Tom Rondeau <address@hidden> wrote:
> 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 the
> > outline given in
> > http://gnuradio.org/redmine/projects/gnuradio/wiki/OutOfTreeModules
> > which, after some figuring out how my setup was missing some things, worked
> > (make and install and runs in GRC) on another simpler block in this same
> > module.
> > This is a re-run of the make spew that fails to link:
> > 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: *** [lib/test-comso] Error 1
> > make: *** [lib/CMakeFiles/test-comso.dir/all] Error 2
> > make: *** [all] Error 2
> > address@hidden build]$
> In lib/CMakeLists.txt, look for the "include(GrTest)" line. Underneath a
> few lines there should be a "target_link_libraries." You need to make sure
> that this includes the proper libraries needed to build the executable. For
> your purposes, you probably need the fftw3f library as well.
Thanks for the timely help.
I tried this with no luck yet.
I added "fftw3f" to the bottom of the list where you indicated and it did not
change anything (other than a slight alteration because it detected a change in
the file I suppose). Same error message at the same point. I also tried
"libfftw3f" instead since I was not certain of the syntax here, and that
actually gave me something like a "library not found" warning. So that at least
confirms just "fftw3f" must indeed be the correct syntax verbatim and it does
find that library on my system.
Just to try it... I also added fftw3f to the end of the target_link_libraries
list for include(GrPlatform) in the same CMakeLists file. But this made no
relevant change to the make spew that I saw (the spew is pretty long when you
edit the cmake text file because you get a ton of -Wno-dev supressable
warnings, at least on my system).
I also tried this with my #define switch for gr::fft::fft_complex versus
fft_impl_fft_complex set both ways, with still no difference there other than
which class is quoted in the error.