2

While compiling, I get the following error:

undefined reference to `gr::fft::window::blackman_harris(int, int)

I know that this linker error is due to not having the gnuradio linker flag in my g++ command. The problem is that I have been unable to find the correct one, and also tried -lgnuradio and -lgr-fft (which don't exist).

I tried searching google, but I only find CMake related threads about gnuradio, while I'm using makefile. Any help?

Roman Rdgz
  • 12,836
  • 41
  • 131
  • 207

2 Answers2

2

If you provide minimal example, I can help you more, this way I just more-less guess.
The particular library name from gnuradio package starts with libgnuradio-[lib].so, eg. in your case libgnuradio-fft.so, so -lgnuradio-fft.

For finding rest of the gnuradio libraries in case more linking problems occur:

  • use pkg-config, gnuradio exposes proper configuration
  • find gnuradio libs in your system paths, depending on your system, eg. /usr/lib, /usr/local/lib, /usr/lib64, or similar. This way you know its names.
pe3k
  • 796
  • 5
  • 15
0

I also had a similar issue, even with using -lgnuradio-fft. Turns out that I only had the versioned libraries installed in /usr/lib/x86_64-linux-gnu/ (libgnuradio-fft.so.3.8.2 for example), so they weren't found when linking.

By using apt-file search libgnuradio-fft.so, I realized that I just needed to apt install gnuradio-dev instead of the gnuradio package.

wrapperapps
  • 937
  • 2
  • 18
  • 30