2
你好智慧的人堆棧溢出,我需要你的幫助。我試圖在運行Windows XP的計算機上安裝一個名爲python-cdb的python模塊。我已經安裝了MinGW和一直在試圖用它作爲我的編譯器,但我得到了以下錯誤消息:需要幫助在Windows上安裝python-cdb
> python setup.py build --compiler=mingw32
running build
running build_ext
building 'cdbmodule' extension
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc/ -IC:\Python26\include-IC:\Python26\PC -c src/cdbmodule.c -o build\temp.win32-2.6\Release\src\cdbmodule.o
src/cdbmodule.c: In function 'cdbo_constructor':
src/cdbmodule.c:616:15: error: 'O_NDELAY' undeclared (first use of this function)
src/cdbmodule.c:616:15: note: each undeclared identifier is reported only once
for each function it appears in
src/cdbmodule.c: In function 'CdbMake_finish':
src/cdbmodule.c:750:3: warning: implicit declaration of function 'fsync'
error: command 'gcc' failed with exit status 1
我已經做了谷歌搜索了不少,但我似乎無法找出什麼這個'O_NDELAY'的事情是或我可以如何解決它。
我也試過使用MS Visual C++ 2008編譯器進行編譯。在這種情況下,我得到了以下錯誤消息:
> pyhon setup.py build
running build
running build_ext
building 'cdbmodule' extension
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Isrc/ -IC:\Python26\include -IC:\Python26\PC /Tcsrc/cdbmodule.c /Fobuild\temp.win32-2.6\Release\src/cdbmodule.obj
cdbmodule.c
src/cdbmodule.c(22) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
error: command '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\cl.exe"' failed with exit status 2
任何幫助將是非常讚賞,因爲我在這一點上我的想法。