New Block execution error

Hi!

I develop a new block to my own library (called gr_my_divisorcamadas_ff)
.
The compilation runs successfully, but when I execute a flow graph with
any
block from the library, I got the following message:

Traceback (most recent call last):
File “/home/rt-dsp/Desktop/Howtowrite/gr-my-basic/top_block.py”, line
14,
in
import gr_my
File “/usr/local/lib/python2.7/dist-packages/gr_my/init.py”, line
40,
in
from gr_my_swig import *
File “/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py”,
line
24, in
_gr_my_swig = swig_import_helper()
File “/usr/local/lib/python2.7/dist-packages/gr_my/gr_my_swig.py”,
line
20, in swig_import_helper
_mod = imp.load_module(’_gr_my_swig’, fp, pathname, description)
ImportError: /usr/local/lib/libgnuradio-gr_my-3.3.0.so.0: undefined
symbol:
_ZTV23gr_my_divisorcamadas_ff

Even if I delete the reference from the new block in all make files and
re-compile the library, the error still persist.

Any ideas?

Best Regards,

On Wed, Feb 29, 2012 at 5:26 PM, Andr S. [email protected]
wrote:

File “/usr/local/lib/python2.7/dist-packages/gr_my/init.py”, line

Andr F. B. Selva -

We’re going to need more information. Are you using cmake or autotools
(Makefile.am) to do this? Are you sure you’re editing the .cc, .h, and
.i
files, AND are you making sure that the relevant files in your build
system
are updated with the correct information?

The error just sounds like you haven’t gotten all of the files updated
correctly.

Tom

I’m using autotools. And I checked many times, and all the Makefiles are
updated correctly with the new block’s information.

One strange point is that even if I delete all the references from the
block from all the Makefiles, the problem still persist.

Att,

2012/2/29 Tom R. [email protected]

My files are attached. Everyone is correctly referenced in the
Makefiles.

2012/3/1 Tom R. [email protected]

On Thu, Mar 1, 2012 at 11:20 AM, Andr S. [email protected]
wrote:

I’m using autotools. And I checked many times, and all the Makefiles are
updated correctly with the new block’s information.

One strange point is that even if I delete all the references from the
block from all the Makefiles, the problem still persist.

Att,

Well, then I’m not too sure what else to tell you. There’s obviously
something wrong with how you’ve set up the block; that’s really the only
explanation. Are you absolutely sure you did everything correctly? What
about the main .i file that includes “#include <yourheader.h>” and
"%include “yourswig.i” files?

Tom

The destructor was my problem!

Thank you!

2012/3/1 Tom R. [email protected]

On Thu, Mar 1, 2012 at 11:50 AM, Andr S. [email protected]
wrote:

My files are attached. Everyone is correctly referenced in the Makefiles.

A couple of things. First, in the make function, you want to return:

 return gnuradio::get_initial_sptr (new gr_my_divisorcamadas_ff ());

This is to make sure the pointers are cleaned up properly upon closing
the
program.

More importantly, you don’t have a destructor defined. You have it in
the
header file but no actual code for it. I’m surprised you’re not getting
a
compiler error about this. Might be your problem.

Tom

On Thu, Mar 1, 2012 at 6:17 PM, Andr S. [email protected]
wrote:

The destructor was my problem!

Thank you!

Glad I could help.

Tom