Re: [Discuss-gnuradio] Question on how to derive a class in an out-of-tree module based on a gnuradio class

2014-10-12 Thread Robert McGwier
Zhe, every single developer who has ever written for GnuRadio runs into this particular swig necessity and searches like mad, certain it is done... Congrats. On Tue, Oct 7, 2014 at 8:18 AM, Zhe Feng feng...@umich.edu wrote: Hi Marcus, Martin and Bastian, Thanks for your help! You are

Re: [Discuss-gnuradio] Question on how to derive a class in an out-of-tree module based on a gnuradio class

2014-10-07 Thread Marcus Müller
This looks like a linker error. In your main CMakeList.txt, you have to add DIGITAL to the line containing set(GR_REQUIRED_COMPONENTS ... If you already have that, sometimes make clean helps, when for some reason linker/ccache/black magic involving CMake failed. Greetings, Marcus On

Re: [Discuss-gnuradio] Question on how to derive a class in an out-of-tree module based on a gnuradio class

2014-10-07 Thread Martin Braun
On 10/07/2014 09:54 AM, Marcus Müller wrote: This looks like a linker error. In your main CMakeList.txt, you have to add DIGITAL to the line containing set(GR_REQUIRED_COMPONENTS ... The OP mentioned he'd already done that, but I still agree with your suspicion. It's actually more likely

Re: [Discuss-gnuradio] Question on how to derive a class in an out-of-tree module based on a gnuradio class

2014-10-07 Thread Marcus Müller
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I should pay closer attention; sorry! On 07.10.2014 11:16, Martin Braun wrote: On 10/07/2014 09:54 AM, Marcus Müller wrote: This looks like a linker error. In your main CMakeList.txt, you have to add DIGITAL to the line containing

Re: [Discuss-gnuradio] Question on how to derive a class in an out-of-tree module based on a gnuradio class

2014-10-07 Thread Bastian Bloessl
Hi, I did that in gr-ieee802-11 and IIRC I had to define GR_API in the swig config https://github.com/bastibl/gr-ieee802-11/blob/master/swig/ieee802_11_swig.i#L18 Hope that helps, Bastian On 07 Oct 2014, at 11:27, Marcus Müller mar...@hostalia.de wrote: -BEGIN PGP SIGNED MESSAGE-

Re: [Discuss-gnuradio] Question on how to derive a class in an out-of-tree module based on a gnuradio class

2014-10-07 Thread Bastian Bloessl
On 07 Oct 2014, at 12:02, Bastian Bloessl bloe...@ccs-labs.org wrote: I did that in gr-ieee802-11 and IIRC I had to define GR_API in the swig config arg, sorry! I had to #define DIGITAL_API and include packet_header_default.h

Re: [Discuss-gnuradio] Question on how to derive a class in an out-of-tree module based on a gnuradio class

2014-10-07 Thread Zhe Feng
Hi Marcus, Martin and Bastian, Thanks for your help! You are right, it's a linker error, the reason is absolutely what Martin mentioned that I didn't refer the header files I used i.e packet_header_default.h in my swig file. I checked Bastian's swig file and made this class working as expected!

[Discuss-gnuradio] Question on how to derive a class in an out-of-tree module based on a gnuradio class

2014-10-06 Thread Zhe Feng
Dear all, I'm trying to derive a *packet_header2* class in my own OOT module based on *gr::digital::packet_header_default*. I followed the way in *packet_heade_ofdm* of gr-digital and made packet_header2.h and packet_header2.cc in my own OOT module. But when I tried to import my_oot in python,