Python embedded - linking problem on Linux - trying again [also goes for python 2.1]
Kim Petersen
kp at kyborg.dk
Wed Aug 14 10:20:57 EDT 2002
Kim Petersen wrote:
>
> When creating an embedded python in an RM/Cobol-85 interpretor, i have
> the following problem:
>
> It seems that i have to link all the modules (the .so's) that i need
> with the new dynamic link library, isn't it at all possible to make it
> (the python embedded interpretor) just find the .so's like the regular
> interpretor does?
>
> Below is the snippet from the Makefile that i use to compile the new .so
>
> CC=gcc -DLINUX -DHAVE_TERMIOS_H=0 \
> -DDYNAMIC_LIBRARIES_SUPPORTED-DUSING_GCC
> CFLAGS=-fPIC -rdynamic
> LDFLAGS=-L/usr/lib/python1.5/config
> COPTIMIZE=-w -O3 -m486 -fomit-frame-pointer -pipe
> LIBS=-ldl -lpython1.5 -lm -lpthread -ltk
>
> DLLS=/usr/lib/python1.5/lib-dynload/*.so
> /usr/lib/python1.5/site-packages/_pgmodule.so
>
> FILES=usrsub.c rmc85.c
>
> CGI=/var/www/cgi-bin
>
> /usr/bin/rmcobolso/pyrmc85.so: rmc85.c rmc85.h
> @echo Making pyrmc85.so
> @$(CC) -shared $(CFLAGS) $(LDFLAGS) \
> $(COPTIMIZE) -D__NOUSR_SUB__ -o $@ rmc85.c $(DLLS) $(LIBS)
>
>
For those who are ideosyncratic on the python version - exactly the same
thing happens when i link against python2.1
i still need to manually link every single .so that is needed by the new
embedded interpretor...
--
Med Venlig Hilsen / Regards
Kim Petersen - Kyborg A/S
IT - Innovationshuset
Havnepladsen 2
7100 Vejle
Tlf. +4576408183 || Fax. +4576408188
More information about the Python-list
mailing list