Forum: GNU Radio prototype for make() does not match any in class

D41d5d1b903f356b90da0c2c8842b41b?d=identicon&s=25 Hoang Ngo Khac (Guest)
on 2014-06-19 09:48
(Received via mailing list)
Dear all,

I'm writing an out-of-tree C++ block performing some PSK mapping method
(BPSK, QPSK. 16PSK, 256PSK). I got this error when running make command:

/home/khachoang/gr-Hoang/lib/Digital_Mapper_impl.cc:36:5: error:
prototype
> for ‘gr::Hoang::Digital_Mapper::sptr gr::Hoang::Digital_Mapper::make(int)’
> does not match any in class ‘gr::Hoang::Digital_Mapper’
> /home/khachoang/gr-Hoang/include/Hoang/Digital_Mapper.h:49:19: error:
> candidate is: static gr::Hoang::Digital_Mapper::sptr
> gr::Hoang::Digital_Mapper::make()


I have tried but still do not know where this error from. Could anyone
help
me to fix it?

My header file:

#ifndef INCLUDED_HOANG_DIGITAL_MAPPER_IMPL_H
>      private:
>        gr_vector_const_void_star &input_items,
>        gr_vector_void_star &output_items);
>     };
>   } // namespace Hoang
> } // namespace gr
> #endif /* INCLUDED_HOANG_DIGITAL_MAPPER_IMPL_H */


My implementation file:

#ifdef HAVE_CONFIG_H
>     Digital_Mapper::sptr
>     {
>     }
>         /* <+forecast+> e.g. ninput_items_required[0] = noutput_items */
>
> exceed)];
> }
> ni++;
> no += 8/log(d_mapping_mode);
> }
> consume_each(ni);
> return no;
>     }
>   } /* namespace Hoang */
> } /* namespace gr */


My xml file:

<?xml version="1.0"?>
>     <type>enum</type>
>       <key>16</key>
>   <source>
>     <name>sym_out</name>
>     <type>complex</type>
>   </source>
> </block>


Many thanks.
Hoang
739a038d5a03d5448114b3615e2caedc?d=identicon&s=25 Activecat K. (activecat_k)
on 2014-06-19 10:25
(Received via mailing list)
On Thu, Jun 19, 2014 at 3:47 PM, Hoang Ngo Khac
<khachoang1412@gmail.com>
wrote:

>> candidate is: static gr::Hoang::Digital_Mapper::sptr
>> gr::Hoang::Digital_Mapper::make()
>
>

Chances are, when you created this block using gr_modtool, you didn't
specify any argument.
But later you decided to add the argument "int mapping_mode", you did
this
by amending "Digital_Mapper_impl.h" and "Digital_Mapper_impl.cc" but
forgotten to look into the file "include/Hoang/Digital_Mapper.h"

If this is the case, the easiest solution is to remove and recreate this
block, both by using gr_modtool, but ensure to specify the argument "int
maping_mode" during the block creation wizard.
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.