I'm using the example in python's 2.6 docs to begin a foray into embedding some python in C. The example C-code does not allow me to execute the following 1 line script:
import math
Using line: ./tmp.exe tmp foo bar
it complains
Traceback (most recent call last):
File "/home/rbroger1/scripts/tmp.py", line 1, in <module>
import math
ImportError: [...]/python/2.6.2/lib/python2.6/lib-dynload/math.so: undefined symbol: PyInt_FromLong
When I do 'nm' on my generated binary (tmp.exe) it shows
0000000000420d30 T PyInt_FromLong
The function seems to be defined, so why can't the shared object find the function?
The folks at bacula seem to be in the same boat, but I don't understand why.