discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Error: ‘pdu’ has not been declared


From: Henning Bredenberg
Subject: Re: [Discuss-gnuradio] Error: ‘pdu’ has not been declared
Date: Wed, 04 May 2016 13:48:33 +0200
User-agent: Horde Application Framework 5

Thanks for the quick response!
In the original block code the name space is

namespace gr {
  namespace blocks {

[...code...]

  } /* namespace blocks */
} /* namespace gr */

whereas in my code it is (obviously...) "work" instead "blocks" in the crucial files: tagged.h (include folder) and tagged_impl.h / tagged_impl.cc (lib folder). Adding gr::blocks:: to the respective pdu-functions, i.e. pdu::vector_type and pdu::itemsize(), just reports me other errors. I tested other changes but I think i need a more precise hint to solve this.

You are probably right that I take a inconvenient way to get started but that's okay for me :-)

Best regards,
Henning


Quoting Marcus Müller <address@hidden>:

Really quickly, I have to go:

gr::block::pdu is the C++ namespace tht the pdu blocks reside in; you'll
have to reproduce that namespace declaration in your files; compare the
`namespace ... {` declarations in the main tree.

By the way, in my opinion experimenting with the existing blocks' source
code to understand them is an excellent, scientific approach! To be
honest, I would have been lazy and just added the addition (optional)
output ports directly to the main GNU Radio source tree blocks; since
git makes handling multiple branches, e.g. master and my_experiments
extremely easy, you could always switch back to a known working source
code :)

Best regards,
Marcus

On 04.05.2016 10:26, Henning Bredenberg wrote:
Hi list,


I created an OOT module "work" and tried to copy the functions of
blocks from the standard library with additional test-outputs for a
better understanding. The block "pdu_to_tagged_stream" is copied in an
own block called "tagged". Via following commands in the build
direction I should be able to use this block in GRC.

cmake ../
make
sudo make install
sudo ldconfig

Following error occurs when i run make:


~/gnuradio/gr-work/build$ make
Scanning dependencies of target gnuradio-work
[  5%] Building CXX object
lib/CMakeFiles/gnuradio-work.dir/tagged_impl.cc.o
In file included from
/home/user1/gnuradio/gr-work/lib/tagged_impl.h:24:0,
                 from /home/user1/gnuradio/gr-work/lib/tagged_impl.cc:25:
/home/user1/gnuradio/gr-work/include/work/tagged.h:50:24: error: ‘pdu’
has not been declared
       static sptr make(pdu::vector_type type, const std::string&
tsb_tag_key);

[...more errors including "‘pdu’ has not been declared"...]

make[2]: *** [lib/CMakeFiles/gnuradio-work.dir/tagged_impl.cc.o] Error 1
make[1]: *** [lib/CMakeFiles/gnuradio-work.dir/all] Error 2
make: *** [all] Error 2


I tried several things but since I'm not a skilled programmer I can't
figure out what to change.
Inserting "#include <gnuradio/blocks/pdu.h>" in the tagged.h file
doesn't fix it.
Anyone who can help me with this? If needed, i can add more
information about the code.


Best regards,
Henning




_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio






reply via email to

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