embedding python, missing symbols

Jack Diederich jack at performancedrivers.com
Sat Jan 25 22:42:04 CET 2003

On Sat, Jan 25, 2003 at 10:10:54PM +0100, Martin v. Löwis wrote:
> Jack Diederich <jack at performancedrivers.com> writes:
> > > > gcc -I<path to Python.h> ./libpython2.2.a example.c
> > > gcc -o example.o -I<path to Python.h> example.c
> > > gcc example.o -o example -L<path to Python-libs> -lpython2.2
> > The -L<path> -l<name> combination gets translated to the plainer
> > full-path of the actual .a lib.  It's a lot more flexible for distributing
> > makefiles, but equivalent to the above.
> No, it's not. You are passing libpython2.2.a first; this is
> incorrect. In the second invocation, -lpython2.2 is passed last.

Ahh, I didn't know order was ever important.  For Makefiles libs go at the
end out of habit, typing it by hand introduced the error.

Thank you, it now works as expected.


More information about the Python-list mailing list