Python/C-API: kompilieren -> fehler

hiho,

ich hab mich mal drangesetzt und mal ein wenig c mit python implementiert, hab das programm auch kompiliert bekommen,
jetzt aber, nach dem ich was weiß ich gemacht habe, kompiliert er den *** nicht mehr,
ich habs mit unten stehendem ausdruck versucht,
bei dem mit sicherheit einige sachen überflüssig sind:

> gcc emb.c -o emb -lpython2.3 -lm -L/usr/lib/python2.3/config -I/usr/include/python2.3 -lpthread -ldl
/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x42ce): In function `posix_tmpnam’:

warning: the use of tmpnam_r' is dangerous, better use mkstemp’

/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x41fd): In function `posix_tempnam’:

warning: the use of tempnam' is dangerous, better use mkstemp’

/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x1eea): In function `posix_openpty’:

undefined reference to `openpty’

/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x1f56): In function `posix_forkpty’:

undefined reference to `forkpty’

collect2: ld returned 1 exit status

original, ohne zusätzliche flags gibt er folgendes aus:

> gcc emb.c -o emb python-config -I/usr/include/python2.3 > test
/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x42ce): In functi on `posix_tmpnam’:

warning: the use of tmpnam_r' is dangerous, better use mkstemp’

/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x41fd): In functi on `posix_tempnam’:

warning: the use of tempnam' is dangerous, better use mkstemp’

/usr/lib/python2.3/config/libpython2.3.a(dynload_shlib.o)(.text+0x190): In funct ion `_PyImport_GetDynLoadFunc’:

undefined reference to `dlopen’

/usr/lib/python2.3/config/libpython2.3.a(dynload_shlib.o)(.text+0x1cf): In funct ion `_PyImport_GetDynLoadFunc’:

undefined reference to `dlsym’

/usr/lib/python2.3/config/libpython2.3.a(dynload_shlib.o)(.text+0x1df): In funct ion `_PyImport_GetDynLoadFunc’:

undefined reference to `dlerror’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0xa2): In function `PyT hread_start_new_thread’:

undefined reference to `pthread_sigmask’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0xc8): In function `PyT hread_start_new_thread’:

undefined reference to `pthread_create’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0xe2): In function `PyT hread_start_new_thread’:

undefined reference to `pthread_sigmask’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0xff): In function `PyT hread_start_new_thread’:

undefined reference to `pthread_detach’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0x236): In function `Py Thread_allocate_lock’:

undefined reference to `sem_init’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0x292): In function `Py Thread_free_lock’:

undefined reference to `sem_destroy’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0x318): In function `Py Thread_acquire_lock’:

undefined reference to `sem_wait’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0x367): In function `Py Thread_acquire_lock’:

undefined reference to `sem_trywait’

/usr/lib/python2.3/config/libpython2.3.a(thread.o)(.text+0x39a): In function `Py Thread_release_lock’:

undefined reference to `sem_post’

/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x1eea): In functi on `posix_openpty’:

undefined reference to `openpty’

/usr/lib/python2.3/config/libpython2.3.a(posixmodule.o)(.text+0x1f56): In functi on `posix_forkpty’:

undefined reference to `forkpty’

collect2: ld returned 1 exit status

(bisschen lang, ich weis)

bitte helft mir, ich kanns mir nicht erklären

mfg TLF

hmm,
quasi gelöst:
… -lutil -lld und -lpthread müssen noch dazu