Forum: GNU Radio another Swig question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
543560fff16cd8ce6ceb506c64c24a2d?d=identicon&s=25 Hans Glitsch (Guest)
on 2007-05-25 18:59
(Received via mailing list)

I've got my own swig problem that I can't seem to figure out.  I'm sorry
this email is so long.  I'm asking for swig help from the gnuradio group
because I didn't think anyone else would understand the gnuradio block
build environment.

I'm trying to use the tinyxml++ code in my gnuradio blocks.  tinyxml++
is just c++ code that you compile into your app, there is no lib to link
with.  I added the cpp and h files to the same directory that holds my
gnuradio blocks, then I added the following to the

_sm_la_SOURCES = \
<snipped other source files listed here>
ticpp.cpp \
tinystr.cpp \
tinyxml.cpp \
tinyxmlerror.cpp \

"make" and "make install" complete without errors - there are no
unresolved externals, etc...

I didn't add anything to the sm.i file because I am not interested in
using the tinyxml++ code directly from python.

When I run my python code that imports the sm library, I get the
following error:  "ImportError:
undefined symbol: _ZN5ticpp8Document11GetAsStringEv"

ticpp::Document::GetAsString is a function in the tinyxml++ code.  I'm
don't understand how python even knows about that function, because none
of the tinyxml++ header files are in my swig input file, and they are
not included by any of the header files that are in my swig input file.

I found documentation on this "undefined symbol" error on the
site (section 29.2.5 of the SWIG documentation), but it only says:

"This error usually indicates that you forgot to include some object
files or libraries in the linking of the shared library file. Make sure
you compile both the SWIG wrapper file and your original program into a
shared library file. Make sure you pass all of the required libraries to
the linker."

If I had forgotten to include some object files, or libraries in the
linking of my block code, I would get an unresolved external error.  I
don't understand what's wrong.  Please give me a hint.

This topic is locked and can not be replied to.