[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] OOT module error linking to gr::filter::mmse_fir_
Re: [Discuss-gnuradio] OOT module error linking to gr::filter::mmse_fir_interpolator_cc in 3.7
Sun, 6 Oct 2013 13:02:21 -0400
On Sat, Oct 5, 2013 at 3:03 PM, ikjtel <address@hidden> wrote:
> This is a case of "everything used to just work" in 3.6 and below, our
> Gardner/Costas block relies on this functionality; i.e., it did a #include
> of gri_mmse_fir_interpolator_cc.h and contructed a new one via "new
> Of course I changed the above (respectively) for 3.7 to
> #include <gnuradio/filter/mmse_fir_interpolator_cc.h>
> ... new gr::filter::mmse_fir_interpolator_cc()
> However in 3.7 there is a linker failure
> libgnuradio-op25_repeater.so: undefined reference to
> A very quick initial diagnosis is that it used to be in libgnuradio-core.so
> in 3.6 and below, but now it's been split out into libgnuradio-filter.so in
> 3.7 - whereas the framework generated by gr_modtool only links to
> libgnuradio-runtime (in 3.7) which of course doesn't contain the mmse
> interpolator ....
> As a workaround I've added a find_library() for libgnuradio-filter.so to the
> lib/CMakeLists.txt which seems to make everything happy... Not sure this
> is even a bug, just mentioning it in case someone else porting to 3.7 may be
> bitten by it...
Yeah, this isn't a bug, it's how it is supposed to work. Since we've
moved all signal processing code out of gnuradio-runtime, you'll have
to pull in other libraries for these different tools and functions.
Since the filter stuff all lives in the gr::filter:: namespace, you
know that it's in the libgnuradio-filter.so library.
This is one reason that I recommend using the new GnuradioConfig.cmake
tool for finding and linking to GNU Radio from your OOT module. For
this case, you need to link against the runtime and filter libraries
for the 3.7 API version. So you would put this in your CMakeLists.txt
set(GR_REQUIRED_COMPONENTS RUNTIME FILTER)
That makes sure that both libgnuradio-runtime and libgnuradio-filter
from API version 3.7.0 (and up) are found. It also sets the cmake
variables for the necessary include directory and library locations
that you would use elsewhere to set your include directories and
library linking targets.