discuss-gnuradio
[Top][All Lists]
Advanced

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

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


From: Marcus Müller
Subject: Re: '*****' has not been declared
Date: Mon, 25 Jul 2022 12:31:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

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

#endif /* INCLUDED_FLORIANINETS_BASEBAND_DEROTATION2_IMPL_H */

When I run make, I get this error list, and I simply don't know why:

In file included from 
/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.h:11,
                  from 
/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.cc:8:
/home/niklas/gr-FlorianiNets/lib/../include/gnuradio/FlorianiNets/baseband_derotation2.h:36:24: error: ‘gr::digital’ has not been declared
    36 |     make(float mu, gr::digital::constellation_sptr, 
gr::digital::constellation);
       |                        ^~~~~~~
/home/niklas/gr-FlorianiNets/lib/../include/gnuradio/FlorianiNets/baseband_derotation2.h:36:57: error: ‘gr::digital’ has not been declared
    36 |     make(float mu, gr::digital::constellation_sptr, 
gr::digital::constellation);
       |                                                         ^~~~~~~
In file included from 
/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.cc:8:
/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.h:21:13: error: ‘digital’ in namespace ‘gr’ does not name a type
    21 |         gr::digital::constellation_sptr;
       |             ^~~~~~~
/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.h:22:13: error: ‘digital’ in namespace ‘gr’ does not name a type
    22 |         gr::digital::c_constellation;
       |             ^~~~~~~
/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.h:27:35: error: ‘gr::digital’ has not been declared
    27 |                               gr::digital::constellation_sptr,
       |                                   ^~~~~~~
/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.h:28:35: error: ‘gr::digital’ has not been declared
    28 |                               gr::digital::constellation);
       |                                   ^~~~~~~



I tried everything, what I know to fix this, but I did not manage to do so.
Maybe someone else has a good advice.

Thank you very much,
Nik


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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