Embedding Python in C, undefined symbol: PyExc_FloatingPointError
"Martin v. Löwis"
martin at v.loewis.de
Wed Aug 17 03:52:18 EDT 2005
Simon Newton wrote:
> gcc main.c -c -I-I/usr/include -I/usr/include -I/usr/include/python2.4
> -I/usr/include/python2.4 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
> gcc main.o -L/usr/lib -lpthread -ldl -lutil
> -lm /usr/lib/python2.4/config/libpython2.4.a -o main
>
> I've tried the above on two machines, one Debian stable and the other
> Debian testing. Same results on both.
>
> It's like I'm missing a library or something, any ideas ?
No. You need to export the Python symbols from your executable to
extension modules. IOW, you need to pass
-Xlinker -export-dynamic
to the gcc invocation.
Regards,
Martin
More information about the Python-list
mailing list