I am trying to use C++ lib with python using SWIG,
my problem is that the main class symbol is missing,



    $ ldd -r -d _rf24.so 2>&1|grep RF24
    undefined symbol: _ZN4RF24C1Ehh (./_rf24.so)

    $ objdump -t librf24-bcm.so.1.0 |grep RF24
    .
    .
    .
    000032cc g     F .text  00000044              _ZN4RF24C1Ehhj
    000032cc g     F .text  00000044              _ZN4RF24C2Ehhj
    .
    .
    .


python exception:


        ImportError: ./_rf24.so: undefined symbol: _ZN4RF24C1Ehh


I tried using the lib objs from the original Makefile or tried to compile them with some flags but the result is the same
build lines:


    $ gcc -c RF24_wrap.cxx -I/usr/include/python2.7
    $ gcc -lstdc++ -shared bcm2835.o RF24.o RF24_wrap.o -o _rf24.so


RF24.i (the SWIG file):


    %module rf24
    %{
    #include "RF24.h"
    %}

    %include "RF24.h"
    //%include "bcm2835.h"
    %include "carrays.i"
    %array_class(char, byteArray);


RF24.h (relevant part of the class header file):


        .
        .
        .
        // bla bla bla enums...

        class RF24
        {
        private:
        // bla bla bla

        protected:
        // bla bla bla

        public:
             RF24(uint8_t _cepin, uint8_t _cspin);
             RF24(uint8_t _cepin, uint8_t _cspin, uint32_t spispeed )

        //bla bla bla
Problem Solved! After using c++filt, I have found out that one of the constructors in the lib wasn't defined, after deleting it problem solved
Missing / wrong signature whan converting c++ library to python using SWIG