discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] SWIG Includes for GRExtras blocks


From: Josh Blum
Subject: Re: [Discuss-gnuradio] SWIG Includes for GRExtras blocks
Date: Sun, 11 Nov 2012 10:19:42 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121028 Thunderbird/16.0.2


On 11/11/2012 07:15 AM, Roy Thompson wrote:
> I am trying to write a C++ block that uses the GRExtras block
> interface, but am having some difficulty figuring out how to include
> the proper headers in my swig.i file.  If I use GR_SWIG_BLOCK_MAGIC2
> along with my block name, I get the following error when building
> swig:
> 
> error: ‘InputItems’ was not declared in this scope

I guess the work function is exposed in your interface header? That
should be ok, but you will either need to %ignore your_block::work or
%include <gnuradio/block.h>

> 
> I have also tried directly including block.h in the swig.i file and
> including various .i files from GRExtras, but I can't seem to find the
> proper includes to get it to compile.  What is the proper syntax for
> doing this?
> 

Try adding these includes to the top of your file

#define GR_EXTRAS_API
%include <gnuradio.i>
%include "extras_factory.i"
%include <gnuradio/block.h>

Post the error w./ swig .i file if its not working:

-josh



reply via email to

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