I followed the gnuradio wiki page commands to create a new block.
address@hidden:~/Desktop$ gr_modtool.py create howto
Module directory is "./gr-howto".
Creating directory...
Copying howto example...
Unpacking...
Replacing occurences of 'howto' to 'howto'...
Skipping ./apps
Skipping ./docs/doxygen/doxyxml
Skipping ./docs/doxygen/doxyxml/example
Skipping ./docs/doxygen/doxyxml/example/xml
Skipping ./docs/doxygen/doxyxml/generated
Skipping ./cmake
Skipping ./cmake/Modules
Skipping ./grc
Done.
Use 'gr_modtool add' to add a new block to this currently empty module.
address@hidden:~/Desktop$ cd gr-howto/
address@hidden:~/Desktop/gr-howto$ gr_modtool.py add -t sync square_ff
Operating in directory .
GNU Radio module name identified: howto
Code is of type: sync
Block/code identifier: square_ff
Full block/code identifier is: howto_square_ff
Enter valid argument list, including default arguments:
Add Python QA code? [Y/n]
Add C++ QA code? [Y/n]
Traversing lib...
Adding file 'howto_square_ff.h'...
Adding file 'howto_square_ff.cc'...
Adding file 'qa_howto_square_ff.cc'...
Traversing swig...
Editing swig/howto_swig.i...
Traversing python...
Adding file 'qa_howto_square_ff.py'...
Editing python/CMakeLists.txt...
Traversing grc...
Adding file 'howto_square_ff.xml'...
Editing grc/CMakeLists.txt...
I have attached the header file that is generated through gr_modtool. You can notice that the generated API is not included in the header file.
I added the API manually and called the sptr using API header to solve this problem.
Regards,
--Khizer Kaleem
Graduate Research Student
Department of Electrical and Computer Engineering
University of Waterloo, Canada