---------------------------------------- > From: [email protected] > Date: Fri, 12 Apr 2013 19:44:26 -0400 > Subject: Re: [Discuss-gnuradio] New dsp block: no constructor defined > To: [email protected] > CC: [email protected] > > On Wed, Apr 10, 2013 at 11:10 PM, LianFeier <[email protected]> wrote: > > Hi! > > > > I'm writing a signal processing block with gr-modtool. I've successfully > > make. When I try ctest -V, I get the "No constructor defined" error. The > > swig interface file which gr_modtool generates is like: > > > > /* -*- c++ -*- */ > > > > #define myblock_API > > > > %include "gnuradio.i" // the common stuff > > > > //load generated python docstrings > > %include "myblock_swig_doc.i" > > > > %{ > > #include "myblock/myclass.h" > > %} > > > > > > %include "myblock/myclass.h" > > GR_SWIG_BLOCK_MAGIC2(myblock, myclass); > > > > I've seen some threads that said swapping the last two lines would help, > > but in my case it didn't. I'm using the latest version of gr-modtool(it > > generates xx_impl.cc,xx_impl.h and xx.h), and my gnuradio version is 3.6.0. > > No, you should be fine with the above setup. We fixed that issue a while ago. > > > Could anybody kindly help? > > I'm not sure. This usually happens when swig isn't run correctly or > installed correctly (are you testing this just with QA code or after > installing it?). > > Can you write down what steps you took when building your code? > > Tom >
Hi Tom, Thanks for your reply! I haven't installed it yet, i am testing it with the QA code. What I did after editing the files generated by gr-modtool is: In the directory of my block: mkdir build cd build cmake ../ make make test I only edited the xx_impl.cc, xx_impl.h, xx.h ,qa_xx.py and the .i files among the whole bunch of files generated by gr_modtool. Is that all I should do? I can now actually piggyback my codes into gnuradio-core and rebuild gnuradio to use gr.myclass in python, but that seems to be very tedious. Not sure whether this information helps. Thanks, Fei _______________________________________________ Discuss-gnuradio mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnuradio
