Compiling Module Issue

Hi,

I’ve added a module ‘sensing’ with a “noblock” block ‘sensing’ but
when I tried to make, I got this error:

Building CXX object
swig/CMakeFiles/_sensing_swig.dir/sensing_swigPYTHON_wrap.cxx.o
In file included from
/home/utilisateur/Documents/Work_tx/gr-sensing/build/swig/sensing_swigPYTHON_wrap.cxx:4509:0:
/usr/include/boost/checked_delete.hpp: In instantiation of ?void
boost::checked_delete(T*) [with T = gr::sensing::sensing]?:
/usr/include/boost/smart_ptr/detail/shared_count.hpp:95:13: required
from ?boost::detail::shared_count::shared_count(Y*) [with Y =
gr::sensing::sensing]?
/usr/include/boost/smart_ptr/shared_ptr.hpp:183:50: required from
?boost::shared_ptr::shared_ptr(Y*) [with Y = gr::sensing::sensing;
T = gr::sensing::sensing]?
/home/utilisateur/Documents/Work_tx/gr-sensing/build/swig/sensing_swigPYTHON_wrap.cxx:5484:111:
required from
here
/home/utilisateur/Documents/Work_tx/gr-sensing/include/sensing/sensing.h:38:7:
erreur: ?gr::sensing::sensing::~sensing()? is private
In file included from /usr/include/boost/smart_ptr/shared_ptr.hpp:30:0,
from /usr/include/boost/shared_ptr.hpp:17,
from /usr/local/include/gnuradio/gr_types.h:27,
from
/home/utilisateur/Documents/Work_tx/gr-sensing/build/swig/sensing_swigPYTHON_wrap.cxx:3113:
/usr/include/boost/checked_delete.hpp:34:5: erreur: l’intrieur du
contexte
make[2]: ***
[swig/CMakeFiles/_sensing_swig.dir/sensing_swigPYTHON_wrap.cxx.o]
Erreur 1
make[1]: *** [swig/CMakeFiles/_sensing_swig.dir/all] Erreur 2
make: *** [all] Erreur 2

Help plz. Any Idea?

Regards,
Nada

I got it, just need the destructor to be public.

Nada ABDELKADER [email protected] a crit:

Hi,

I’ve added a module ‘sensingmod’ with a “noblock” block ‘sensing’ but
when I tried to call the block from python, I got this error:

Traceback (most recent call last):
File “./tunnel_tx_simul.py”, line 49, in
from sensingmod import sensing
File
“/usr/local/lib/python2.7/dist-packages/sensingmod/init.py”, line
45, in
from sensingmod_swig import *
File
“/usr/local/lib/python2.7/dist-packages/sensingmod/sensingmod_swig.py”,
line
188, in
sensing = sensing.make;
AttributeError: type object ‘sensing’ has no attribute ‘make’

I thought I had to add a function “make” to the block but still got the
error.

Any Idea?

Regards,
Nada

Thank you for your help, it works now.

Reagrds,
Nada

Tom R. [email protected] a crit:

On Tue, May 14, 2013 at 11:35 AM, Nada ABDELKADER
[email protected] wrote:

from sensingmod_swig import *

Regards,
Nada

Looks like there were a couple of typos in the templates for the
noblock. I pushed a fix for it to maint/master/next.

For your problem, just go into your swig/sensingmod_swig.i and remove
the GR_SWIG_BLOCK_MAGIC line for this particular class. This only
means anything for gr_block classes.

Tom