Hi Marcin, On 22/02/2022 14.32, Marcin Puchlik wrote: > But I am not creating the OOT module, I want to get filter taps using > *low_pass()* function in simple C++ program (Hello World).
It does not really matter what you are building, if you want to use this function then you need to link this library. > I even ran this from cmd with the command: *g++ > -I/usr/include/gnuradio/filter -L/usr/lib/x86_64-linux-gnu/ main.cpp * You need to add -lgnuradio-filter parameter g++ -I/usr/include/gnuradio/filter -L/usr/lib/x86_64-linux-gnu/ -lgnuradio-filter main.cpp Cheers, Vasil > and the error is: > > > > */bin/ld: /tmp/ccTlKCri.o: in function `main':main.cpp:(.text+0xc7): > undefined reference to `gr::filter::firdes::low_pass_2(double, double, > double, double, double, gr::fft::window::win_type, double)'collect2: error: > ld returned 1 exit status* > > > > wt., 22 lut 2022 o 13:22 Vasil Velichkov <vvvelich...@gmail.com> napisaĆ(a): > >> Hi Marcin, >> >> On 22/02/2022 13.09, Marcin Puchlik via GNU Radio, the Free & Open-Source >> Toolkit for Software Radio wrote: >>> I also tried to use *low_pass() *function in my C++ program but with no >>> luck. My linker shouts that there is undefined reference to this function >>> but headers where recognized. >> >> You need to link your OOT module to gnuradio-filter library - in >> lib/CMakeLists.txt in target_link_libraries() add gnuradio-filter. >> >> target_link_libraries(gnuradio-test gnuradio::gnuradio-runtime >> gnuradio-filter) >> >> Regards, >> Vasil >> >