[Python/C++ Question] Embedding Modules in C++

Mike F Winter mfw127 at skorpio.usask.ca
Wed Aug 15 18:30:08 EDT 2001


Hi all, I understand that embedding questions are one of the bains of this group,
but I was wondering if someone could help me anyway.

While embedding my python code in C++, I can import and access some system
modules (string, etc..) fine, but when I try to import the socket library, I get
this error:

  File "<string>", line 1, in ?
  File "/usr/lib/python2.1/socket.py", line 41, in ?
    from _socket import *
ImportError: /usr/lib/python2.1/lib-dynload/_socket.so: undefined symbol:
PyEval_SaveThread


Do I have to link in this shared object when compiling my c++ code?  Is this true
for all dynamically loaded libraries? Thanks in advance for any help.




More information about the Python-list mailing list