| Store | Cart

Linking to Python 2.2

From: Martin v. Loewis <mar...@v.loewis.de>
12 Jul 2002 21:26:03 +0200
"Nathan Cassano" <nathan at cjhunter.com> writes:

> 	I am having trouble linking to the Python library for> development purposes. Does anyone know the correct way to link to Python> version 2.2? 

The correct way depends on the operating system. In this case, you
should study and understand the error messages, and correct them.

> /usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function> `posix_tempnam':> /usr/src/packages/BUILD/Python-2.2.1/./Modules/posixmodule.c:4451: the> use of `tempnam' is dangerous, better use `mkstemp'

This is a warning; you can ignore it.

> /usr/src/packages/BUILD/Python-2.2.1/Objects/complexobject.c:148:> undefined reference to `sin'

This is an error. The symbol "sin" is defined by the math library, so
you need to link with "-lm". Add this linker option, then see what
other errors remain. Proceed for other undefined symbols in the same
way: find out where these symbols are defined, and add the missing

In principle, you can use both distutils and the installed
Makefile.pre to obtain the necessary information in a
platform-independent way. However, it would be simpler to just adjust
the build process manually if you target only a few systems.


Recent Messages in this Thread
Michael Melchert Jul 12, 2002 07:13 pm
Martin v. Loewis Jul 12, 2002 07:26 pm
Messages in this thread