I'm trying to get a cross compiler working for arm-wince-pe. This is the output for the primes Pyrex example. If I compile simple Hello, World's etc, it works fine, but for some reason Python libraries/headers seem to produce this. I have libpython2.3.a in /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib/ and /usr/lib/python2.3/config. I've checked it using arm-wince-pe-objdump and it's a COFF file. I also extracted it with arm-wince-pe-ar and it contains the symbols. Any ideas? $ python setup.py build_ext --inplace -c cygwin running build_ext building 'Primes' extension creating build creating build/temp.cygwin-1.5.11-i686-2.3 arm-wince-pe-gcc -O -Wall -I/usr/include/python2.3 -c primes.c -o build/temp.cyg win-1.5.11-i686-2.3/primes.o primes.c: In function `__pyx_f_6primes_primes': primes.c:137: warning: label `__pyx_L4' defined but not used primes.c:108: warning: label `__pyx_L6' defined but not used primes.c:98: warning: label `__pyx_L5' defined but not used primes.c:89: warning: label `__pyx_L3' defined but not used primes.c: At top level: primes.c:12: warning: `__Pyx_UnpackItem' declared `static' but never defined primes.c:13: warning: `__Pyx_EndUnpack' declared `static' but never defined primes.c:14: warning: `__Pyx_PrintItem' declared `static' but never defined primes.c:15: warning: `__Pyx_PrintNewline' declared `static' but never defined primes.c:16: warning: `__Pyx_Raise' declared `static' but never defined primes.c:17: warning: `__Pyx_ReRaise' declared `static' but never defined primes.c:18: warning: `__Pyx_Import' declared `static' but never defined primes.c:19: warning: `__Pyx_GetExcValue' declared `static' but never defined primes.c:20: warning: `__Pyx_ArgTypeTest' declared `static' but never defined primes.c:21: warning: `__Pyx_TypeTest' declared `static' but never defined primes.c:22: warning: `__Pyx_GetStarArgs' declared `static' but never defined primes.c:23: warning: `__Pyx_WriteUnraisable' declared `static' but never define d primes.c:25: warning: `__Pyx_ImportType' declared `static' but never defined primes.c:26: warning: `__Pyx_SetVtable' declared `static' but never defined primes.c:27: warning: `__Pyx_GetVtable' declared `static' but never defined primes.c:28: warning: `__Pyx_CreateClass' declared `static' but never defined primes.c:30: warning: `__Pyx_InitStrings' declared `static' but never defined primes.c:31: warning: `__Pyx_GetName' declared `static' but never defined writing build/temp.cygwin-1.5.11-i686-2.3/Primes.def arm-wince-pe-gcc -mdll -static -s build/temp.cygwin-1.5.11-i686-2.3/primes.o bui ld/temp.cygwin-1.5.11-i686-2.3/Primes.def -L/usr/lib/python2.3/config -lpython2. 3 -o Primes.dll Cannot export initPrimes (initPrimes): symbol not found build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x30):primes.c: undefined refer ence to `PyArg_ParseTupleAndKeywords' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x54):primes.c: undefined refer ence to `PyList_New' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x130):primes.c: undefined refe rence to `PyObject_GetAttr' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x144):primes.c: undefined refe rence to `PyInt_FromLong' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x158):primes.c: undefined refe rence to `PyTuple_New' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x174):primes.c: undefined refe rence to `PyObject_CallObject' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x2d0):primes.c: undefined refe rence to `_Py_NoneStruct' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x308):primes.c: undefined refe rence to `Py_InitModule4' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x320):primes.c: undefined refe rence to `PyImport_AddModule' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x348):primes.c: undefined refe rence to `PyObject_SetAttrString' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x3d4):primes.c: undefined refe rence to `PyString_InternFromString' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x430):primes.c: undefined refe rence to `PyString_FromString' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x444):primes.c: undefined refe rence to `PyString_FromString' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x45c):primes.c: undefined refe rence to `PyModule_GetDict' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x470):primes.c: undefined refe rence to `PyTuple_New' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x484):primes.c: undefined refe rence to `PyString_FromString' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4d0):primes.c: undefined refe rence to `PyCode_New' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4e0):primes.c: undefined refe rence to `PyThreadState_Get' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x4f0):primes.c: undefined refe rence to `PyFrame_New' build/temp.cygwin-1.5.11-i686-2.3/primes.o(.text+0x508):primes.c: undefined refe rence to `PyTraceBack_Here' /usr/local/lib/gcc-lib/arm-wince-pe/3.3.3/../../../../arm-wince-pe/lib/crt0.o(.t ext+0x6c): undefined reference to `WinMain' collect2: ld returned 1 exit status error: command 'arm-wince-pe-gcc' failed with exit status 1