swig-python import error

Discussion in 'Python' started by abarun22@gmail.com, Mar 7, 2008.

  1. Guest

    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_PRECISION -
    DDON_DOUBLE_PRECISION ${PYTHON_INCLUDE_PATH} ${CHAINE_INCLUDE_PATH}

    # linking
    ld -b binary -g -shared ${ETUDE}.o ${ETUDE}_wrap.o -o _${ETUDE}.so \
    -a archive ${LIBS_CHAINE_PATH} -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
    , Mar 7, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon Moldover
    Replies:
    0
    Views:
    296
    Jon Moldover
    Oct 28, 2003
  2. Jeff
    Replies:
    0
    Views:
    714
  3. Bill Davy
    Replies:
    0
    Views:
    683
    Bill Davy
    May 12, 2005
  4. samsappleton
    Replies:
    0
    Views:
    305
    samsappleton
    Mar 11, 2008
  5. MRAB
    Replies:
    0
    Views:
    403
Loading...

Share This Page