Embedded Python Linking Problem

Ian Terrell kife00 at yahoo.com
Wed Feb 26 00:22:53 EST 2003


Jp Calderone <exarkun at intarweb.us> wrote in message news:<mailman.1046211133.15312.python-list at python.org>...
>   Try:  g++ hello.cc -o hello -L/usr/lib/python2.2/config/ -lpython2.2

I'll give it a shot:
$ g++ hello.cc -o hello -L/usr/lib/python2.2/config/ -lpython2.2
/usr/lib/python2.2/config//libpython2.2.a(posixmodule.o): In function
`posix_tmpnam':
posixmodule.o(.text+0x3977): the use of `tmpnam_r' is dangerous,
better use `mkstemp'
/usr/lib/python2.2/config//libpython2.2.a(posixmodule.o): In function
`posix_tempnam':
posixmodule.o(.text+0x385e): the use of `tempnam' is dangerous, better
use `mkstemp'
/usr/lib/python2.2/config//libpython2.2.a(dynload_shlib.o): In
function `_PyImport_GetDynLoadFunc':
dynload_shlib.o(.text+0x1ca): undefined reference to `dlopen'
dynload_shlib.o(.text+0x207): undefined reference to `dlsym'
dynload_shlib.o(.text+0x217): undefined reference to `dlerror'
/usr/lib/python2.2/config//libpython2.2.a(thread.o): In function
`PyThread_start_new_thread':
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'
collect2: ld returned 1 exit status


Which just brings a whole new slew of linking errors. =)

- Ian




More information about the Python-list mailing list