2011-07-29 16 views
9

我試圖編譯the Open Kinect drivers for Python on WindowsI made a Make file with CMake (link)並嘗試用VC++ Express編譯它。在Windows上編譯Python的Open Kinect驅動程序時出現的問題

一切似乎編譯好了(查看器示例工程),除了Python包裝。我更改了freenect的輸出文件夾,它將freenect.lib放置在另一個文件夾中以防止發生衝突。當我改變了這一點,並嘗試編譯cython_freenect我得到:

1>------ Build started: Project: ZERO_CHECK, Configuration: Release Win32 ------ 
2>------ Build started: Project: freenect, Configuration: Release Win32 ------ 
2>  Creating library C:/IvoPython/Kinect/Driver/lib/Release/freenect.lib and object C:/IvoPython/Kinect/Driver/lib/Release/freenect.exp 
2> freenect.vcxproj -> C:\IvoPython\Kinect\Driver\Release\freenect.dll 
3>------ Build started: Project: freenect_sync, Configuration: Release Win32 ------ 
3>  Creating library C:/IvoPython/Kinect/Driver/lib/Release/freenect_sync.lib and object C:/IvoPython/Kinect/Driver/lib/Release/freenect_sync.exp 
3> freenect_sync.vcxproj -> C:\IvoPython\Kinect\Driver\Release\freenect_sync.dll 
4>------ Build started: Project: cython_freenect, Configuration: Release Win32 ------ 
4>LINK : fatal error LNK1149: output filename matches input filename 'C:\IvoPython\Kinect\Driver\lib\Release\freenect.lib' 
========== Build: 3 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== 

很奇怪的是,它無法找到庫,因爲它只是創造了它,我手動將其鏈接到庫中。

enter image description here

任何建議,我在做什麼錯?據我所知,我遵循了Python Wrapper for Windows guide中的所有步驟。

+1

請注意,我有事情編譯絕對的零以往的經驗,所以如果我失去了一些東西很明顯,請賜教;-) –

回答

2

不知怎的,鏈接器得到了一個錯誤的參數:輸出文件與其中一個輸入文件匹配。 是C:/ IvoPython/Kinnect/Driver從您的下載中獲得一條現有路徑嗎?

你應該儘量選擇Kinnect,也許C溫度範圍之外構建目標:/ IvoPython /建造

+1

我不得不在CMAKE中手動設置一個文件夾:http://i.stack.imgur.com/qsz0y.png除cython_freenect之外的所有文件都可以正確構建。我認爲這個問題部分是由於cython_freenect構建它的依賴關係,即使它們已經存在。我會盡量把它放在一個完全不同的地方,儘管 –

+1

看起來這與之前的一個固定的問題類似,儘管我並沒有從修復它之後嘗試編譯開始。 https://github.com/OpenKinect/libfreenect/issues/235 –

+1

事實證明,我已經將他們移出並添加了一個鏈接到他們的新位置,但是我忘了刪除舊的鏈接。所以它說它找不到它們。現在構建完全成功:D –

相關問題