An extension I used uses some other functions i made (outside of the sources used by the extension itself), but it complains about them upon import as being undefined symbols.
twoll_linearsea rch() is a function in an object file I include in the extra_objects member of the Extension object I make in the setup.py script. Here's the script:
Code:
>>> import libpytwo2gam Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: ./libpytwo2gam.so: undefined symbol: twoll_linearsearch >>>
Code:
from distutils.core import setup, Extension
ARCH = 'x86_64'
extra = ['../../../misc/ll/'+ARCH+'_tmp/ll.o',
'../../simple/'+ARCH+'_tmp/srctools.o',
'../'+ARCH+'_tmp/util.o',
'../'+ARCH+'_tmp/extern.o']
print extra
two2gam_module = Extension('libpytwo2gam',
sources=['pyext.c'],
extra_objects = extra,
libraries=['SDL', 'SDL_image'])
setup(name = 'libpytwo2gam',
version = '0.0.1',
description = 'Python Interface for two2gam',
author = '{2}rIng',
author_email = 'xxx@xxx.com',
long_description = '''
Description says it (IOW, long_descriptions goes here!).
''',
ext_modules = [two2gam_module])