Problem with linking embedding C application

Olivier Deme odeme at airtel-atn.com
Mon Oct 1 08:24:32 EDT 2001


> I think that you may need to add at least
> -lpthread -lm -lutil
> to you ld line?
>
> I have a machine, where I need to do:
>  -lnsl -ldl -lreadline -ltermcap -lpthread -lutil -lm
> to be able to link with python.

I can't believe I would have to link my application with something like pthread
if I don't use it! After all, Python is supposed to make an application
portable... Our C application is portable and needs to be shipped to a
customer. So including things like "pthread", "nsl" and the-like would break
the main reason why I decided to extend our application with some Python code.

As far as it seems, it looks like it is way easier to embed TCL code in C,
rather than Python...
Sad, since I prefer Python.

Maybe, we are missing some information. Is there a hello world type application
that would demonstrate embedding Python with C or C++?

Olivier.






More information about the Python-list mailing list