Monday, July 25, 2022

Re: '*****' has not been declared

Hi Nik,

if you use names from a different header file, you'll need to include that header,
otherwise your compiler can't know what that name means! In this case, you need to include
the header that defines gr::digital::constellation and gr::digital::constellation_sptr.
That would be done by

#include <gnuradio/digital/constellation.h>

in your header.

(note: that's a bit of a basic C++ thing, you need to declare the things you use in each
compilation unit *before* you use them.)

Best regards,
Marcus

PS: kind of surprising to pass in both a shared pointer to a constellation object, and to
pass-by-value (i.e., make a copy) another constellation object. Hope that makes sense!


On 25.07.22 12:14, Beckmann, Niklas wrote:
> Dear members of the gnuradio mailing list,
>
>
> since 2 days I am trying to fix this error. So maybe one of you guys can help me...
>
> I am grateful for any help.
>
>
> I have the following code, which is the impl.h file of a block from my oot module.
>
>
> #ifndef INCLUDED_FLORIANINETS_BASEBAND_DEROTATION2_IMPL_H
> #define INCLUDED_FLORIANINETS_BASEBAND_DEROTATION2_IMPL_H
>
> #include <gnuradio/FlorianiNets/baseband_derotation2.h>
>
> namespace gr {
> namespace FlorianiNets {
>
> class baseband_derotation2_impl : public baseband_derotation2
> {
> private:
>     float f_mu;
>     float f_error;
>     gr::digital::constellation_sptr;
>     gr::digital::c_constellation;
>     float wrap_phase(float phi);
>
> public:
>     baseband_derotation2_impl(float mu,
>                               gr::digital::constellation_sptr,
>                               gr::digital::constellation);
>     ~baseband_derotation2_impl();
>
>     // Where all the action really happens
>     int work(int noutput_items,
>              gr_vector_const_void_star& input_items,
>              gr_vector_void_star& output_items);
> };
>
> } // namespace FlorianiNets
> } // namespace gr
>
>

No comments:

Post a Comment