[IPython-user] Embedding IPython in C program?

Fernando Perez fperez at colorado.edu
Mon Jun 2 15:13:40 CDT 2003


Herb Schilling wrote:

> Add
> 
> 	-ldl
> 
> to the link line.

Ok, making some progress.  Still:


thread.o(.text+0xb3): undefined reference to `pthread_sigmask'
thread.o(.text+0xd9): undefined reference to `pthread_create'
thread.o(.text+0xf3): undefined reference to `pthread_sigmask'
thread.o(.text+0x12a): undefined reference to `pthread_detach'
/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function 
`posix_openpty':
posixmodule.o(.text+0x17fe): undefined reference to `openpty'
/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function 
`posix_forkpty':
posixmodule.o(.text+0x188f): undefined reference to `forkpty'

So another -lXXX is needed.  Any hints?  By the way, this stuff feels way more 
hackish than it should.  Is it documented anywhere?  I pored over the standard 
docs, but couldn't find any specific examples.

>   Things are going OK for me now except I have to figure out how to 
> have the commands entered at the shell prompt take effect on my 
> application immediately. As it stands now, I don't see the results of 
> what I did until I exit the shell. I guess that's because there is 
> only one thread of execution ? Somehow I need to have the IPython 
> shell in a separate thread? Any ideas ?

Sorry, but you're venturing into fully uncharted territory here.  So there may 
be monsters behind the trees :)  But please report back when you return, as 
I'm sure the experience will be of use to others.  Also, comp.lang.py might be 
of assistance on this, since there are quite a few folks there with embedding 
experience.

Best,

f.




More information about the IPython-user mailing list