1
我無法安裝asyncio backport trollius。從文檔,我必須:「......先建_overlapped.pyd擴展(它將被放置在ASYNCIO目錄):」安裝asyncio backport trollius時出現gcc錯誤(Python 2.7.5和Win7)
PS C:\Users\M1330\Downloads\trollius-0.1.6> python setup.py build_ext
running build_ext
building 'asyncio._overlapped' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\WinPython\tools\mingw32\bin\gcc.exe -mdll -O -Wall -IC:\WinPython\python-2.7.5\include -IC:\WinPython\python-2.7.5\PC -c overlapped.c -o build\temp.win32-2.7\Release\overlapped.o
overlapped.c:105:1: error: unknown type name 'LPFN_ACCEPTEX'
overlapped.c:105:36: warning: initialization makes integer from pointer without a cast [enabled by default]
overlapped.c:106:1: error: unknown type name 'LPFN_CONNECTEX'
overlapped.c:106:38: warning: initialization makes integer from pointer without a cast [enabled by default]
overlapped.c:107:1: error: unknown type name 'LPFN_DISCONNECTEX'
overlapped.c:107:44: warning: initialization makes integer from pointer without a cast [enabled by default]
overlapped.c: In function 'initialize_function_pointers':
overlapped.c:118:25: error: 'WSAID_ACCEPTEX' undeclared (first use in this function)
overlapped.c:118:25: note: each undeclared identifier is reported only once for each function it appears in
overlapped.c:119:26: error: 'WSAID_CONNECTEX' undeclared (first use in this function)
overlapped.c:120:29: error: 'WSAID_DISCONNECTEX' undeclared (first use in this function)
overlapped.c: In function 'overlapped_RegisterWaitWithQueue':
overlapped.c:293:5: warning: implicit declaration of function 'RegisterWaitForSingleObject' [-Wimplicit-function-declaration]
overlapped.c:294:38: error: 'WAITORTIMERCALLBACK' undeclared (first use in this function)
overlapped.c:294:58: error: expected ')' before 'PostToQueueCallback'
overlapped.c: In function 'overlapped_UnregisterWait':
overlapped.c:320:5: warning: implicit declaration of function 'UnregisterWait' [-Wimplicit-function-declaration]
overlapped.c: In function 'Overlapped_dealloc':
overlapped.c:583:21: warning: unknown conversion type character 'R' in format [-Wformat]
overlapped.c:583:21: warning: too many arguments for format [-Wformat-extra-args]
overlapped.c: In function 'Overlapped_AcceptEx':
overlapped.c:959:22: error: called object 'Py_AcceptEx' is not a function
overlapped.c: In function 'Overlapped_ConnectEx':
overlapped.c:1046:23: error: called object 'Py_ConnectEx' is not a function
overlapped.c: In function 'Overlapped_DisconnectEx':
overlapped.c:1086:26: error: called object 'Py_DisconnectEx' is not a function
overlapped.c: In function 'Overlapped_WaitNamedPipeAndConnect':
overlapped.c:1224:5: warning: implicit declaration of function 'QueueUserWorkItem' [-Wimplicit-function-declaration]
overlapped.c: In function '_init_overlapped':
overlapped.c:1410:5: error: 'SO_UPDATE_CONNECT_CONTEXT' undeclared (first use in this function)
overlapped.c: At top level:
overlapped.c:256:1: warning: 'PostToQueueCallback' defined but not used [-Wunused-function]
overlapped.c:517:1: warning: 'Overlapped_doc' defined but not used [-Wunused-variable]
error: command 'gcc' failed with exit status 1
未聲明的變量和類型名稱。我知道小C,我在這裏錯過了什麼?
昨天上傳的trollius版本爲0.2,我可以在沒有MS SDK的情況下安裝它。事情並非如此。賞金是爲您的Python 2 asynco端口,謝謝! – Sam
我現在分配輪包,Trollius可以使用pip輕鬆安裝:http://trollius.readthedocs.org/#install-trollius-on-windows-using-pip – haypo