discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Are there firls and kaiser filter methods for C++ OOT?


From: Vasil Velichkov
Subject: Re: Are there firls and kaiser filter methods for C++ OOT?
Date: Tue, 22 Feb 2022 15:19:25 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

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 <vvvelichkov@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
>>
> 




reply via email to

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