Help with ImportError: dynamic module does not define init function (init_gold)

Hi Friends

I wrote a new Gnuradio block and everything went fine including the
install.
But when i import the module in python interpreter i get this error. Can
anyone suggest where could the problem be.

ImportError: dynamic module does not define init function (init_gold)

I use SWIG Version 1.3.31 and gnuradio 3.1.3 (the latest SVN
distribution)

Thanks
Ali

On Sun, Sep 7, 2008 at 12:34 AM, Murtuza [email protected] wrote:

I wrote a new Gnuradio block and everything went fine including the install.
But when i import the module in python interpreter i get this error. Can
anyone suggest where could the problem be.

ImportError: dynamic module does not define init function (init_gold)

This symbol refers to code that is created by swig. Are you using a
customized version of gr-howto-write-a-block?


Johnathan C.
Corgan Enterprises LLC
http://corganenterprises.com/

I made my block according to gr-howto-write-a-block. I wrote the SWIG
interface similar to what gr-howto-write-a-block does.

Thanks
Ali

On Sun, Sep 7, 2008 at 12:57 PM, Johnathan C. <

Never mind, I found the mistake in my Makefile.am I forgot to add the
SWIG
generated .cc source under _la_SOURCES primary.

Thanks to all, again
Ali

Hi,
I have this error too.
This is what I get when I run make check:
ImportError: dynamic module does not define init function (init_deco)

I looked into the Makefile of top_dir/src/lib and the *_la_SOURCES ,
*_pylib_LTLIBRARIES, _python_PYTHON seem to be ok.
SWIG Version 1.3.36.
It has been created in the directory /python/site-packages/gnuradio
files
.py, _.la, _
.so from the new block.

I took the how-to-write… for writing my block.
I have Ubuntu 9.04 - Jaunty Jackalope.
I don’t know how to solve it.

Thanks


View this message in context:
http://www.nabble.com/help-with-ImportError%3A-dynamic-module-does-not-define-init-function-(init_gold)-tp19355015p25274694.html
Sent from the GnuRadio mailing list archive at Nabble.com.