Hi group,
since I don't have (and like) VC+, I would like to build _namemapper.c,
which is not available in binary form for Python 2.7, with MinGW.
I created a simple compile script:
======
from distutils.core import setup, Extension
module1 = Extension('namemapper', sources = ['cheetah/c/_namemapper.c'])
setup (name = 'namemapper',
version = '1.0',
description = 'Namemapper C Version',
ext_modules = [module1])
======
When trying to compile with
python nm.py build -cmingw32
I get the following output:
======
$ python nm.py build -cmingw32
running build
running build_ext
building 'namemapper' extension
d:\MinGW\bin\gcc.exe -mdll -O -Wall -Id:\tools2\python\include
-Id:\tools2\python\PC -c cheetah/c/_namemapper.c -o
build\temp.win32-2.7\Release\cheetah\c\_namemapper.o
writing build\temp.win32-2.7\Release\cheetah\c\namemapper.def
d:\MinGW\bin\gcc.exe -shared -s
build\temp.win32-2.7\Release\cheetah\c\_namemapper.o
build\temp.win32-2.7\Release\cheetah\c\namemapper.def
-Ld:\tools2\python\libs -Ld:\tools2\python\PCbuild -lpython27 -lmsvcr90 -o
build\lib.win32-2.7\namema
pper.pyd
Cannot export initnamemapper: symbol not defined
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Could someone give me a hint as to what I'm doing wrong?
Thanks
Jan
|