0
因此,我有一個C++類,我爲它製作了Python包裝,並且爲了在python中使用它而創建了一個setup.py文件來編譯它。當我嘗試運行python setup.py安裝我收到以下錯誤:爲什麼我的setup.py腳本會出現這個錯誤?
lipo: can't create output file: build/temp.macosx-10.5-fat3-2.7/../tools/transport-stream/TransportStreamPacket_py.o (No such file or directory)
error: command 'gcc-4.0' failed with exit status 1
我不認爲這個問題是與正編譯的文件,我想我一定要建立setup.py錯誤。這裏是我的setup.py文件是什麼樣子:
from distutils.core import setup, Extension
module1 = Extension('CL_TransportStreamPacket_py',
sources = ['../tools/transport-stream/TransportStreamPacket_py.cpp'],
include_dirs = ['.',
'../common',
'../tools/transport-stream'],
library_dirs = ['common',
'../tools/transport-stream'],
libraries = ['Common',
'TransportStream']
)
setup (name = 'CL_TransportStreamPacket_py',
version = '1.0',
description = 'This is the transport stream packet parser',
ext_modules = [module1])
您是否檢查文件是否存在於錯誤消息指示的位置?如果沒有,目錄是否存在? – 2010-07-22 21:29:24