[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Build C++ processing blocks with input parameters
From: |
Martin Braun |
Subject: |
Re: [Discuss-gnuradio] Build C++ processing blocks with input parameters |
Date: |
Tue, 14 Jul 2015 09:28:41 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
Is this an exercise for you? Can't you use multiply_const_ff from GNU Radio?
Your code has some simple C++ errors; I recommend you carefully read the
compiler output and reference that to your code. Also, you might want to
grab a book on C++. The error message you've posted doesn't give enough
info (but this is also the kind of question that's best asked maybe in a
C++ forum).
Cheers,
M
On 14.07.2015 07:53, Gabriele Galiero wrote:
> I have been trying to build an easy block called mutiply_ff, having an
> input parameter int multiple. The block is meant to multiply each
> element of the input streams by the parameter multiple.
>
> I am getting one error when:
>
> mkdir build
> cd build
> cmake ../
> make (Here I get ERROR!)
>
> This is the error:
>
> [ 5%] Building CXX object
> lib/CMakeFiles/gnuradio-gabri.dir/multiply_ff_impl.cc.o
> In file included from
> /home/comlab/Desktop/Gabri/mimo/gr-gabri/lib/multiply_ff_impl.h:24:0,
> from
> /home/comlab/Desktop/Gabri/mimo/gr-gabri/lib/multiply_ff_impl.cc:26:
> /home/comlab/Desktop/Gabri/mimo/gr-gabri/include/gabri/multiply_ff.h:49:24:
> error: ‘multiple’ has not been declared
> static sptr make(multiple);
> ^
> /home/comlab/Desktop/Gabri/mimo/gr-gabri/lib/multiply_ff_impl.cc:31:23:
> error: prototype for ‘gr::gabri::multiply_ff::sptr
> gr::gabri::multiply_ff::make(unsigned int)’ does not match any in class
> ‘gr::gabri::multiply_ff’
> multiply_ff::sptr multiply_ff::make(unsigned multiple)
> ^
> In file included from
> /home/comlab/Desktop/Gabri/mimo/gr-gabri/lib/multiply_ff_impl.h:24:0,
> from
> /home/comlab/Desktop/Gabri/mimo/gr-gabri/lib/multiply_ff_impl.cc:26:
> /home/comlab/Desktop/Gabri/mimo/gr-gabri/include/gabri/multiply_ff.h:49:19:
> error: candidate is: static gr::gabri::multiply_ff::sptr
> gr::gabri::multiply_ff::make(int)
> static sptr make(multiple);
> ^
> make[2]: *** [lib/CMakeFiles/gnuradio-gabri.dir/multiply_ff_impl.cc.o]
> Error 1
> make[1]: *** [lib/CMakeFiles/gnuradio-gabri.dir/all] Error 2
> make: *** [all] Error 2
>
>
> I attach the lib files where the function is implemented.
> Any help or tip is welcome. Thanks in advance.
>
> Attachments:
> http://www.ruby-forum.com/attachment/10912/multiply_ff_impl.cc
> http://www.ruby-forum.com/attachment/10913/multiply_ff_impl.h
>
>