This blog gathers problems I found in my every day life when dealing with computers as well as their solutions. It also contains information on subjects such as
- Data Analysis
- Python tutorial and notes
- Science
- Computer Science in general
- and many more such as photos, travels and so on.
Visit also my main page thomas-cokelaer.info that contains links to some software and tutorials I wrote.
Dear Thomas Cokelaer,
first off, thank you so much for writing the spectrum module. It should come in handy. At the moment my work laptop is running Windows and when compiling the module got the following error:
C:\MinGW32-xy\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Python27\include -IC:\Python27\PC -c src/cpp/mydpss.c -o build\temp.win32-2.7\Release\src\cpp\mydpss.o
writing build\temp.win32-2.7\Release\src\cpp\mydpss.def
C:\MinGW32-xy\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.7\Release\src\cpp\mydpss.o build\temp.win32-2.7\Release\src\cpp\mydpss.def -LC:\Python27\libs -LC:\Python27\PCbuild -lpython27 -lmsvcr90 -o build\lib.win32-2.7\spectrum\mydpss.pyd
Cannot export initmydpss: symbol not defined
collect2: ld returned 1 exit status
error: command ‘gcc’ failed with exit status 1
Seems that the distutils automatically renerate a .def file which tries to export initmydpss(). This is a default function that get called when python inits your module. I solved the error with an ugly hack: just adding a template function to src/cpp/mydpss.c:
#include
PyMODINIT_FUNC
initmydpss(void)
{
}
This fixes the error, but it is a bit weird. Just thought I’d let you know about this.
regards,
Marijn.