Fantastic, works like a charm! I thought the problem was in the way I was using SWIG but the culprit was the C/C++ linkage. Now I can try it with my original files.

Thanks for all the help!

Jonas

Jan Schiefer wrote:

Finally: “make clean”, “make” and “make check”.

This results in:

ImportError: /home/jonas/gnuradio/gr-howto-write-a-block-3.0.2/src/lib/.libs/_howto.so: undefined symbol: _Z10jonas_testv

What you need to do is to surround the declaration of jonas_testv() with en extern "C" {} declaration. If you don't do this, then the linker is looking for the "mangled name" , which is C++'s way to embed type declarations in a function name. If the function is declared in the .h as extern "C", it will just expect the function name with an underscore in front of it, just like C does.

Cheers,
  Jan


=======================================================================
This email, including any attachments, is only for the intended
addressee.  It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================



_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to