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, MarcusPS: 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 declared36 | 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 declared36 | 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 type21 | gr::digital::constellation_sptr; | ^~~~~~~/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.h:22:13: error: ‘digital’ in namespace ‘gr’ does not name a type22 | gr::digital::c_constellation; | ^~~~~~~/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.h:27:35: error: ‘gr::digital’ has not been declared27 | gr::digital::constellation_sptr, | ^~~~~~~/home/niklas/gr-FlorianiNets/lib/baseband_derotation2_impl.h:28:35: error: ‘gr::digital’ has not been declared28 | 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
smime.p7s
Description: S/MIME Cryptographic Signature