Linking to Python 2.2

Nathan Cassano nathan at cjhunter.com
Fri Jul 12 13:28:01 EDT 2002


Hi folks,
	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? Should I just try a different version of Python? Thank for
your help.


Here's that action.

gcc  -g -O2 -o program main.o -Xlinker --export-dynamic -Wl,-E
-L/usr/lib/python2.2/config -lpython2.2   -ldl -lpthread -lutil

/usr/lib/python2.2/config/libpython2.2.a(posixmodule.o): In function
`posix_tmpnam':
/usr/src/packages/BUILD/Python-2.2.1/./Modules/posixmodule.c:4501: the
use of `tmpnam_r' is dangerous, better use `mkstemp'
/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'
/usr/lib/python2.2/config/libpython2.2.a(floatobject.o): In function
`float_pow':
/usr/src/packages/BUILD/Python-2.2.1/Objects/floatobject.c:578:
undefined reference to `pow'
/usr/lib/python2.2/config/libpython2.2.a(complexobject.o): In function
`_Py_c_pow':
/usr/src/packages/BUILD/Python-2.2.1/Objects/complexobject.c:140:
undefined reference to `pow'
/usr/src/packages/BUILD/Python-2.2.1/Objects/complexobject.c:144:
undefined reference to `exp'
/usr/src/packages/BUILD/Python-2.2.1/Objects/complexobject.c:145:
undefined reference to `log'
/usr/src/packages/BUILD/Python-2.2.1/Objects/complexobject.c:147:
undefined reference to `cos'
/usr/src/packages/BUILD/Python-2.2.1/Objects/complexobject.c:148:
undefined reference to `sin'
collect2: ld returned 1 exit status

Python 2.2.1
Suse 8.0
Linux 2.4.18
Gcc 2.95.3






More information about the Python-list mailing list