|
From: | Jan Schiefer |
Subject: | Re: [Discuss-gnuradio] Multiple C files required by single C++ block.How to build? |
Date: | Wed, 29 Nov 2006 14:56:17 -0800 |
User-agent: | Thunderbird 1.5.0.8 (Windows/20061025) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |