1 libusb 1.0 Windows binary snapshot - README 2 3 ********************************************************************* 4 * The latest version of this snapshot can always be downloaded at: * 5 * https://sourceforge.net/projects/libusb/files/ * 6 ********************************************************************* 7 8o Visual Studio: 9 - Open existing or create a new project for your application 10 - Copy libusb.h, from the include\libusb-1.0\ directory, into your project and 11 make sure that the location where the file reside appears in the 'Additional 12 Include Directories' section (Configuration Properties -> C/C++ -> General). 13 - Copy the relevant .lib file from MS32\ or MS64\ and add 'libusb-1.0.lib' to 14 your 'Additional Dependencies' (Configuration Properties -> Linker -> Input) 15 Also make sure that the directory where libusb-1.0.lib resides is added to 16 'Additional Library Directories' (Configuration Properties -> Linker 17 -> General) 18 - If you use the static version of the libusb library, make sure that 19 'Runtime Library' is set to 'Multi-threaded DLL (/MD)' (Configuration 20 Properties -> C/C++ -> Code Generation). 21 NB: If your application requires /MT (Multi-threaded/libCMT), you need to 22 recompile a static libusb 1.0 library from source. 23 - Compile and run your application. If you use the DLL version of libusb-1.0, 24 remember that you need to have a copy of the DLL either in the runtime 25 directory or in system32 26 27o WDK/DDK: 28 - The following is an example of a sources files that you can use to compile 29 a libusb 1.0 based console application. In this sample ..\libusb\ is the 30 directory where you would have copied libusb.h as well as the relevant 31 libusb-1.0.lib 32 33 TARGETNAME=your_app 34 TARGETTYPE=PROGRAM 35 USE_MSVCRT=1 36 UMTYPE=console 37 INCLUDES=..\libusb;$(DDK_INC_PATH) 38 TARGETLIBS=..\libusb\libusb-1.0.lib 39 SOURCES=your_app.c 40 41 - Note that if you plan to use libCMT instead of MSVCRT (USE_LIBCMT=1 instead 42 of USE_MSVCRT=1), you will need to recompile libusb to use libCMT. This can 43 easily be achieved, in the DDK environment, by running 'ddk_build /MT' 44 45o MinGW/cygwin 46 - Copy libusb.h, from include/libusb-1.0/ to your default include directory, 47 and copy the MinGW32/ or MinGW64/ .a files to your default library directory. 48 Or, if you don't want to use the default locations, make sure that you feed 49 the relevant -I and -L options to the compiler. 50 - Add the '-lusb-1.0' linker option when compiling. 51 52o Additional information: 53 - The libusb 1.0 API documentation can be accessed at: 54 http://api.libusb.info 55 - For some libusb samples (including source), please have a look in examples/ 56 - For additional information on the libusb 1.0 Windows backend please visit: 57 http://windows.libusb.info 58 - The MinGW and MS generated DLLs are fully interchangeable, provided that you 59 use the import libs provided or generate one from the .def also provided. 60 - If you find any issue, please visit http://libusb.info/ and check the 61 Support section 62