discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] New dsp block: no constructor defined


From: Tom Rondeau
Subject: Re: [Discuss-gnuradio] New dsp block: no constructor defined
Date: Fri, 12 Apr 2013 19:44:26 -0400

On Wed, Apr 10, 2013 at 11:10 PM, LianFeier <address@hidden> 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


> Update:
> I've tried with the simplest gr-howto block, it failed too. So I guess this 
> error is not due to my c++ code?
>
> ERROR: test_001_t (__main__.qa_square_ff)
> 2: ----------------------------------------------------------------------
> 2: Traceback (most recent call last):
> 2:   File "/home/gnu/gr-howto/python/qa_square_ff.py", line 37, in test_001_t
> 2:     sqr = howto.square_ff()
> 2:   File "/home/gnu/gr-howto/build/swig/howto_swig.py", line 161, in __init__
> 2:     def __init__(self, *args, **kwargs): raise AttributeError("No 
> constructor defined")
> 2: AttributeError: No constructor defined
>
> Regards and thanks,
> Fei
> _______________________________________________
> 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]