discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] Help in adding new block to existing OOT module


From: Sumit Kumar
Subject: [Discuss-gnuradio] Help in adding new block to existing OOT module
Date: Tue, 14 Nov 2017 17:13:15 +0100

Hi,

I went inside the folder 

>> cd gr-ieee-80211

Added a new block test_block_cf to existing module gr-ieee-80211

>> gr_modtool add test_block_cf

It added test_block_cf_impl.cc and test_block_cf_impl.h in /lib and 
test_block_cf.h in /include/ieee802_11

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. 

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. 

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. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
address@hidden:~/radio/default/src/gr-ieee-80211/build$ make
[  2%] Built target ieee802_11_generated_includes
[  4%] Built target ieee802_11_generated_sources
[  6%] Building CXX object lib/CMakeFiles/gnuradio-ieee802_11.dir/test_block_cf_impl.cc.o
In file included from /home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc:26:0:
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.h:21:25: warning: extra tokens at end of #ifndef directive
 #ifndef INCLUDED_IEEE802-11_TEST_BLOCK_CF_IMPL_H
                         ^
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.h:22:25: warning: ISO C++11 requires whitespace after the macro name
 #define INCLUDED_IEEE802-11_TEST_BLOCK_CF_IMPL_H
                         ^
In file included from /home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.h:24:0,
                 from /home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc:26:
/home/john/radio/default/src/gr-ieee-80211/include/ieee802-11/test_block_cf.h:22:25: warning: extra tokens at end of #ifndef directive
 #ifndef INCLUDED_IEEE802-11_TEST_BLOCK_CF_H
                         ^
In file included from /home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc:26:0:
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.h:30:5: error: expected class-name before ‘{’ token
     {
     ^
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc:31:5: error: ‘test_block_cf’ does not name a type
     test_block_cf::sptr
     ^
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc: In constructor ‘gr::ieee802_11::test_block_cf_impl::test_block_cf_impl(size_t)’:
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc:42:23: error: expected class-name before ‘(’ token
       : gr::sync_block("test_block_cf",
                       ^
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc:42:23: error: expected ‘{’ before ‘(’ token
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc: At global scope:
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc:42:24: error: expected unqualified-id before string constant
       : gr::sync_block("test_block_cf",
                        ^
/home/john/radio/default/src/gr-ieee-80211/lib/test_block_cf_impl.cc:42:24: error: expected ‘)’ before string constant
lib/CMakeFiles/gnuradio-ieee802_11.dir/build.make:560: recipe for target 'lib/CMakeFiles/gnuradio-ieee802_11.dir/test_block_cf_impl.cc.o' failed
make[2]: *** [lib/CMakeFiles/gnuradio-ieee802_11.dir/test_block_cf_impl.cc.o] Error 1
CMakeFiles/Makefile2:200: recipe for target 'lib/CMakeFiles/gnuradio-ieee802_11.dir/all' failed
make[1]: *** [lib/CMakeFiles/gnuradio-ieee802_11.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
address@hidden:~/radio/default/src/gr-ieee-80211/build$ 



Attachment: test_block_cf_impl.cc
Description: Text Data

Attachment: test_block_cf_impl.h
Description: Text Data

Attachment: test_block_cf.h
Description: Text Data


reply via email to

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