Problem with linking embedding C application

Nigel Wade nmw at ion.le.ac.uk
Mon Oct 1 09:40:31 EDT 2001


"Olivier Deme" <olivier.deme at airtel-atn.com> writes:

> Hi,
> 
> We have written an application written in C, which invokes sometimes the Python 
> interpreter for executing Python methods.
> 
> So, I am trying to statically link our application with libpython*.*.a., but this result in various 
> undefined symbols (see below).
> 
> Now, it looks like I am missing symbols defined in the math and posix thread library! I don't
> understand this since we are not using any symbols defined in these libraries.
> Could anybody tell me what is going on and how I can fix this problem?
> 
> Thanks!
> 

Because Python uses them.

Add the correct list of libraries to the link library list.
Probably some combination of the following:

 -ldb -lpthread -lnsl -ldl -lm

at the very least -lpthread and -lm as you have already found out.

Not sure how many of these are available as static (archive) libraries.

-- 
Nigel Wade



More information about the Python-list mailing list