• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Installation Instructions for Windows
2*************************************
3
4If you are compiling for MinGW or cygwin, please refer to the INSTALL file,
5which is automatically generated by autotools (e.g. running bootstrap.sh).
6
7If you are using Microsoft Visual Studio:
8- Using Visual Studio 2022, open /msvc/libusb.sln
9- If you want to debug the library, uncomment the ENABLE_DEBUG_LOGGING define
10  in msvc/config.h
11- Select your configuration and compile the project.
12- To target a specific toolset (previous version of Visual Studio), either
13  edit PlatformToolset in /msvc/Configuration.Base.props, or supply the value
14  to msbuild on the command line.
15- For example, to build for VS2015 (from a different version):
16  msbuild -p:PlatformToolset=v140,Platform=x64,Configuration=Release libusb.sln
17
18Installing and building libusb via vcpkg
19****************************************
20
21You can download and install libusb using the vcpkg dependency manager:
22
23    git clone https://github.com/Microsoft/vcpkg.git
24    cd vcpkg
25    ./bootstrap-vcpkg.bat
26    ./vcpkg integrate install
27    vcpkg install libusb
28
29The libusb port in vcpkg is kept up to date by Microsoft team members and
30community contributors. If the version is out of date, please create an issue
31or pull request (https://github.com/Microsoft/vcpkg) on the vcpkg repository.
32
33Destination directories
34***********************
35
36The binaries are located at:
37/build/<PlatformToolset>/<Platform>/<Configuration>/(lib|dll)/libusb-1.0.(lib|dll)
38For example: /build/v143/x64/Release/dll/libusb-1.0.dll
39
40Troubleshooting
41***************
42
43If the compilation process complains about missing libraries, ensure that the
44default library paths for your project points to the relevant directories.
45If needed, these libraries can be obtained by installing the latest Windows
46SDK.
47
48Links
49*****
50
51Additional information related to the Windows backend:
52  http://windows.libusb.info
53