[libxml++] problem in compiling basic C++ with libxml++ library



 Hello,

I apologize for the very basic problem but I am just at the beginning with
C++.
I am trying to use the libxml++ library and I thought to have a look at the
examples. I have downloaded and installed the debian packages available on
http://mirror.raw.no/gnome2.2/, then I have written a very simple source
like this:

#include <libxml++/libxml++.h>

int main(int argc, char *argv[])
{
return 0;
}

I compile it with g++ -Wall -o xml xml.cc `pkg-config --libs --cflags
libxml++-1.0` and i get a lot of errors while linking:

/usr/lib/libxml++-0.1.so: undefined reference to `__cxa_rethrow'
/usr/lib/libxml++-0.1.so: undefined reference to `std::uncaught_exception()'
/usr/lib/libxml++-0.1.so: undefined reference to `std::exception::~exception
[not-in-charge]()'
/usr/lib/libxml++-0.1.so: undefined reference to
`std::__throw_ios_failure(char
const*)'
/usr/lib/libxml++-0.1.so: undefined reference to `__cxa_call_unexpected'
/usr/lib/libxml++-0.1.so: undefined reference to `std::__throw_bad_alloc()'
/usr/lib/libxml++-0.1.so: undefined reference to `vtable for
__cxxabiv1::__si_class_type_info'
/usr/lib/libxml++-0.1.so: undefined reference to `operator delete(void*)'
/usr/lib/libxml++-0.1.so: undefined reference to
`std::__throw_length_error(char
const*)'
/usr/lib/libxml++-0.1.so: undefined reference to `__cxa_end_catch'
/usr/lib/libxml++-0.1.so: undefined reference to `__gxx_personality_v0'
/usr/lib/libxml++-0.1.so: undefined reference to `__cxa_pure_virtual'
/usr/lib/libxml++-0.1.so: undefined reference to
`std::ios_base::Init::Init[in-charge]()'
/usr/lib/libxml++-0.1.so: undefined reference to `vtable for
__cxxabiv1::__class_type_info'
/usr/lib/libxml++-0.1.so: undefined reference to `__cxa_throw'
/usr/lib/libxml++-0.1.so: undefined reference to `vtable for
__cxxabiv1::__vmi_class_type_info'
/usr/lib/libxml++-0.1.so: undefined reference to `std::ios_base::Init::~Init
[in-charge]()'
/usr/lib/libxml++-0.1.so: undefined reference to `__cxa_begin_catch'
/usr/lib/libxml++-0.1.so: undefined reference to `__cxa_allocate_exception'
/usr/lib/libxml++-0.1.so: undefined reference to `operator new(unsigned)'
collect2: ld returned 1 exit status

Could you please help me to realize where is the mistake? I am wondering
that I
get so many errors from a simple source like this and I don't know exactly
if it
is my fault or maybe the debian packager did something wrong in putting the
right dynamic library (I see /usr/lib/libxml++-0.1.so, so version 0.1).
Thanks
in advance for your help.

Fabrizio






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