Linked vs. libpython.a (Linux)

Jp Calderone exarkun at mudprovider.com
Fri Nov 3 02:22:32 EST 2000


 I'm trying to embed the python interpreter into 
an app but I'm having problems getting the linker
to go... Here's what I get in final stages of 
compile:

/usr/local/lib/libpython.a(posixmodule.o): In function `posix_openpty':
/usr/src/Python-2.0/Modules/./posixmodule.c:1698: undefined reference to
`openpty'
/usr/local/lib/libpython.a(posixmodule.o): In function `posix_forkpty':
/usr/src/Python-2.0/Modules/./posixmodule.c:1729: undefined reference to
`forkpty'
collect2: ld returned 1 exit status


Linker flags I'm using now are  `-lcrypt -lpthread 
-lxml -lz -lpython -lreadline -ldb -ldl' (Not all 
in connection to python).  All sources I've been able
to find suggest that openpty() and forkpty() are in
libc... but even with the redundant -lc flag it won't
link correctly.  Am I missing something, or is my system
screwed up?

 Thanks in advance for any help,
  Jp Calderone



More information about the Python-list mailing list