Yes just 1 minute after posting this mail I realized that hyphen in include
guard is the root.
I always created my own OOT, never added block in existing OOT, good
learning for me !

I understood, the "make install" should place the public header in
/include.

Yes the CMakelist.txt was updated by the gr_modtool.

Thanks :)



On Tue, Nov 14, 2017 at 5:51 PM, Marcus Müller <muel...@kit.edu> wrote:

> Hi Sumit,
>
> On Tue, 2017-11-14 at 17:13 +0100, Sumit Kumar wrote:
>
> > Added a new block test_block_cf to existing module gr-ieee-80211
> >
> > >> gr_modtool add test_block_cf
>
> Correct way to do it!
>
> > It added test_block_cf_impl.cc and test_block_cf_impl.h in /lib and
> > test_block_cf.h in /include/ieee802_11
>
> it should have also added the appropriate targets in the individual
> CMakeLists.txt,
>
> >
> > Now I did the usual stuff in my work function, also copied
> >
> > test_block_cf.h from /include/ieee802_11 to /prefix/include/ieee802-11/
> gnuradio/ieee802_11
> > to make it a public header file. Seems gr_modtool does not want to do
> this for me.
>
> Not its job; it sets up the CMake Files, and then the includes should
> be copied over with a "make install".
> >
> > I also noticed that by default my namespace was ieee802-11 which is
> different from ieee802_11 used by the author. Hence I changed ieee802-11 to
> ieee802_11 in all my files which were generated by gr_modtool.
>
> That's interesting! So, yeah, the author might have hit a slight
> inconsistency here:
> The project name (just like the folder name) is with -, the namespace
> is with _, so yes, your manual changes are necessary here.
>
> > Following to this I did following inside build directory of gr-ieee-80211
> >
> > >> cmake -DENABLE_DOXYGEN=ON -DCMAKE_INSTALL_PREFIX=../ ../
> > >> make
>
> > Make throws errors as below which is related to inheritance I guess.
> >
> >  #define INCLUDED_IEEE802-11_TEST_BLOCK_CF_IMPL_H
>
> as you can see, "-" becomes a problem, as it's interpreted as operator,
> so it needs to be replaced with "_" here, too.
>
> Best regards,
> Marcus
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to