Undefined Symbols while importing modules

Discussion in 'Python' started by sudharsh@gmail.com, Dec 4, 2007.

  1. Guest

    Hi all,
    I have been learning to write Python extension modules, and am quite
    at a loss over a small glitch thats taking place. When I import my
    module I get the following exception

    >>> import pygsmd

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python2.5/site-packages/pygsmd/__init__.py", line 9,
    in <module>
    import _pygsmd, network, voicecall, sms, phonebook
    ImportError: /usr/lib/python2.5/site-packages/pygsmd/network.so:
    undefined symbol: pygsmd_handler

    But the pygsmd_handler function is defined in the source file that
    produces _pygsmd.so. Also as you can see _pygsmd in imported first in
    my __init__.py. Of course following the usual C rules, pygsmd_handler
    is declared extern in a header that the other sources include. Is
    there a way I could bring pygsmd_handler function in a more common
    namespace?, so that other modules may use them. It seems that using
    the build_clib feature creates only static libraries. Is there a way I
    can create dynamic ones using distutils?

    Thanks for the hints

    Regards
    Sudharshan S
     
    , Dec 4, 2007
    #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. Stu
    Replies:
    1
    Views:
    1,301
  2. r
    Replies:
    2
    Views:
    715
    Rob Williscroft
    Aug 2, 2003
  3. pervinder
    Replies:
    0
    Views:
    302
    pervinder
    Aug 30, 2004
  4. Tobiah
    Replies:
    2
    Views:
    320
    Tobiah
    Sep 14, 2003
  5. Peter Peyman Puk

    Importing v reloading modules modules

    Peter Peyman Puk, Mar 19, 2010, in forum: Python
    Replies:
    0
    Views:
    309
    Peter Peyman Puk
    Mar 19, 2010
Loading...

Share This Page