2012-05-10 08:44:30 -07:00
|
|
|
Installation Instructions for Windows
|
|
|
|
*************************************
|
|
|
|
|
2020-08-18 10:07:46 -07:00
|
|
|
If you are compiling for MinGW or cygwin, please refer to the INSTALL file,
|
|
|
|
which is automatically generated by autotools (e.g. running bootstrap.sh).
|
2012-05-10 08:44:30 -07:00
|
|
|
|
|
|
|
If you are using Microsoft Visual Studio:
|
2022-02-26 20:29:43 -07:00
|
|
|
- Using Visual Studio 2022, open /msvc/libusb.sln
|
2012-05-10 08:44:30 -07:00
|
|
|
- If you want to debug the library, uncomment the ENABLE_DEBUG_LOGGING define
|
2022-02-26 20:29:43 -07:00
|
|
|
in msvc/config.h
|
|
|
|
- Select your configuration and compile the project.
|
|
|
|
- To target a specific toolset (previous version of Visual Studio), either
|
|
|
|
edit PlatformToolset in /msvc/Configuration.Base.props, or supply the value
|
|
|
|
to msbuild on the command line.
|
|
|
|
- For example, to build for VS2015 (from a different version):
|
|
|
|
msbuild -p:PlatformToolset=v140,Platform=x64,Configuration=Release libusb.sln
|
2012-05-10 08:44:30 -07:00
|
|
|
|
2020-04-17 01:52:28 -07:00
|
|
|
Installing and building libusb via vcpkg
|
|
|
|
****************************************
|
|
|
|
|
|
|
|
You can download and install libusb using the vcpkg dependency manager:
|
|
|
|
|
|
|
|
git clone https://github.com/Microsoft/vcpkg.git
|
|
|
|
cd vcpkg
|
|
|
|
./bootstrap-vcpkg.bat
|
|
|
|
./vcpkg integrate install
|
|
|
|
vcpkg install libusb
|
|
|
|
|
|
|
|
The libusb port in vcpkg is kept up to date by Microsoft team members and
|
|
|
|
community contributors. If the version is out of date, please create an issue
|
|
|
|
or pull request (https://github.com/Microsoft/vcpkg) on the vcpkg repository.
|
|
|
|
|
2012-05-10 08:44:30 -07:00
|
|
|
Destination directories
|
|
|
|
***********************
|
|
|
|
|
2022-02-26 20:29:43 -07:00
|
|
|
The binaries are located at:
|
|
|
|
/build/<PlatformToolset>/<Platform>/<Configuration>/(lib|dll)/libusb-1.0.(lib|dll)
|
|
|
|
For example: /build/v143/x64/Release/dll/libusb-1.0.dll
|
2012-05-10 08:44:30 -07:00
|
|
|
|
|
|
|
Troubleshooting
|
|
|
|
***************
|
|
|
|
|
|
|
|
If the compilation process complains about missing libraries, ensure that the
|
|
|
|
default library paths for your project points to the relevant directories.
|
2020-01-21 16:39:34 -07:00
|
|
|
If needed, these libraries can be obtained by installing the latest Windows
|
|
|
|
SDK.
|
2012-05-10 08:44:30 -07:00
|
|
|
|
|
|
|
Links
|
|
|
|
*****
|
|
|
|
|
|
|
|
Additional information related to the Windows backend:
|
2014-01-08 16:50:34 -07:00
|
|
|
http://windows.libusb.info
|