swig-python import error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • abarun22@gmail.com

    swig-python import error

    Hi
    I am facing a problem while loading a SWIG generated shared module
    from python. The development is under HP-UX 32b platform. I use gcc
    version 4.0.2 to build the shared module. This is how i try to build
    the module.

    # Compilation
    GCC="$GCC -march=1.1"
    $GCC -v -c -fpic ${ETUDE}.c ${ETUDE}_wrap.c -DDOUBLE_PRECISI ON -
    DDON_DOUBLE_PRE CISION ${PYTHON_INCLUD E_PATH} ${CHAINE_INCLUD E_PATH}

    # linking
    ld -b binary -g -shared ${ETUDE}.o ${ETUDE}_wrap.o -o _${ETUDE}.so \
    -a archive ${LIBS_CHAINE_P ATH} -lfichiers_r8 -lmem -lutilitaires -
    lsysteme -lcalcul -lmsgml -lcaractere \
    -rpath -L/michprojects/ef/deli/Working/Source/deli9-PYAPI/Sandbox/libs/
    chaine/PYAPI/don -L/michprojects/ef/deli/Working/Source/deli9-PYAPI/
    Sandbox/libs/chaine/hppa_portable-hp-hpux11.11/Debug

    The module generated is called _don.so. In addition to that i set the
    module path in LD_LIBRARY_PATH environment variable. Th error looks
    like as follows.

    Import error: module cannot be loaded.

    But i am wondering how i am getting import error although every thing
    looks OK. Any ideas are most welcome and thanks in advance.
    Regards,
    Arun
Working...