2

当我按照https://github.com/OpenKinect/libfreenect2上的说明在 Windows 10 上安装 libfreenect2 时。我无法构建 libUSB 相关文件。

最初,我使用 git 安装了 libUSB,但收到以下消息(但未显示为错误)

Build succeeded.

"D:\Tools\Kinect\libfreenect2-
master\depends\libusb_src\msvc\libusb_dll_2015.vcxproj" (Rebuild target) (1) 
->
(Link target) ->
..\libusb\libusb-1.0.def : warning LNK4197: export 'libusb_set_option' 
specified multiple times; using first specification 
[D:\Tools\Kinect\libfreenect2-master\depends\libusb_src\msvc\libusb_dll_2015.vcxproj]

1 Warning(s)
0 Error(s)

Time Elapsed 00:00:05.43

D:\Tools\Kinect\libfreenect2master\depends\libusb_src>"D:\Tools\Compiler\MSBuild\15.0\Bin\MSBuild.exe" msvc\libusb_usbdk_dll_2015.vcxproj /p:Platform=x64 /p:Configuration=Release /target:Rebuild   || exit /b
Microsoft (R) Build Engine version 15.5.180.51428 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

MSBUILD : error MSB1009: Project file does not exist.
Switch: msvc\libusb_usbdk_dll_2015.vcxproj

然后我使用 CMAKE 构建整个项目,但出现以下错误。

Selecting Windows SDK version to target Windows 10.0.16299.
The C compiler identification is MSVC 19.12.25835.0
The CXX compiler identification is MSVC 19.12.25835.0
Check for working C compiler:           
D:/Tools/Compiler/VC/Tools/MSVC/14.12.25827/bin/Hostx86/x64/cl.exe
Check for working C compiler:         
D:/Tools/Compiler/VC/Tools/MSVC/14.12.25827/bin/Hostx86/x64/cl.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: 
D:/Tools/Compiler/VC/Tools/MSVC/14.12.25827/bin/Hostx86/x64/cl.exe
Check for working CXX compiler: 
D:/Tools/Compiler/VC/Tools/MSVC/14.12.25827/bin/Hostx86/x64/cl.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Detecting CXX compile features
Detecting CXX compile features - done
using tinythread as threading library
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Performing Test LIBUSB_WITH_LIBUSBK
Performing Test LIBUSB_WITH_LIBUSBK - Failed
Performing Test LIBUSB_WITH_USBDK
Performing Test LIBUSB_WITH_USBDK - Success
CMake Error at D:/Tools/Kinect/Setups/cmake-3.10.2-win64-x64/cmake-3.10.2-
win64-x64/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 
(message):
**Could NOT find LibUSB (missing: LibUSB_LIBRARIES LibUSB_INCLUDE_DIRS)**
Call Stack (most recent call first):
D:/Tools/Kinect/Setups/cmake-3.10.2-win64-x64/cmake-3.10.2-win64-x64/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake_modules/FindLibUSB.cmake:102 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:93 (FIND_PACKAGE)


Configuring incomplete, errors occurred!
See also "D:/Tools/Kinect/installed/CMakeFiles/CMakeOutput.log".
See also "D:/Tools/Kinect/installed/CMakeFiles/CMakeError.log".

我曾尝试使用 Visual Studio 使用 .sln 文件构建 libUSB,但结果相同。

我已经尝试了所有我知道的方法,但它仍然可以找到我构建的 libUSB 文件。

提前感谢您的回答。

真挚地

4

0 回答 0