discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Building new blocks in Gnu Radio


From: Martin Braun
Subject: Re: [Discuss-gnuradio] Building new blocks in Gnu Radio
Date: Tue, 27 Mar 2012 09:45:12 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Mar 26, 2012 at 12:27:42PM -0700, Nick Foster wrote:
>     After this, I used cmake. I wrote:
>     >cmake -i
>     >sudo make
>     >sudo make install
>     >sudo ldconfig

I assume you know what you're doing, but just in case someone reads this
who doesn't, the recommended way is

mkdir build
cd build
cmake ../
make # This is what I mean
sudo make install
sudo ldconfig

So don't run make as root (permissions and so on).

>     These were my steps to build a new block to use in GRC. However, I get 
> this
>     error:
> 
>     ImportError: /usr/local/lib/python2.7/dist-
>     packages/mycoolstuff/_mycoolstuff_swig.so: undefined symbol:
>     _Z38mycoolstuff_make_decimated_average_vccifi
> 
>     Yes. My module and block are called mycoolstuff and
>     decimated_average_vcc.cc
> 
>     It seems that there is a problem with the swig. Do I have to configure
>     anything
>     in the .i files before starting to use cmake?
> 
> My guess is you haven't declared your functions as API exports. There should 
> be
> a file in your module called include/mycoolstuff_api.h, which should be #
> included by your block implementations and the public constructor declared 
> like
> this:
> 
> MYCOOLSTUFF_API mycoolstuff_make_decimated_average(.....) {}
> 
> This will export the symbol so it gets called out in the library.

If you use gr_modtool.py, it will take care of this.

MB

-- 
Karlsruhe Institute of Technology (KIT)
Communications Engineering Lab (CEL)

Dipl.-Ing. Martin Braun
Research Associate

Kaiserstra├če 12
Building 05.01
76131 Karlsruhe

Phone: +49 721 608-43790
Fax: +49 721 608-46071
www.cel.kit.edu

KIT -- University of the State of Baden-W├╝rttemberg and
National Laboratory of the Helmholtz Association

Attachment: pgpzrvIMhZDkT.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]