undefined symbols when linking Python into a shared library
Martin v. Loewis
martin at v.loewis.de
Fri Mar 8 04:07:19 EST 2002
Michael Neuroth <michael.neuroth at freenet.de> writes:
> Thank you for the tip, now I can see, that the 'missing symbol' is
> exported from the shared library:
>
> 000a7bac D _Py_NoneStruct
>
> Is there any difference for exported (data) symbols, when loading
> a shared library with dlopen() instead of linking it 'statically' while
> creating the program file?
Certainly: If a symbol is missing in a program, the program cannot
resolve that symbol from a library opened through dlopen: For that to
work, the program would need to start executing. It cannot execute if
it has missing symbols.
> That is true of course. Is there any possibility to create a shared
> libraray for Python: libpython.so instead of libpython.a?
Not currently. On SF, there are a number of patches that provide this
facility. To get PIC objects, setting CFLAGS may be sufficient.
Regards,
Martin
More information about the Python-list
mailing list