This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiling usb_bulk_example.c use Visual C++ 2010



Hi Friends,

I try to Compile usb_bulk_example.c using Visual C++ 2010, and got a error is as following

As the error information "libusb-win32\include\usb.h", I can't find related folder and header file in my PC.

Who can tel me how to modify it?

Thank you.

  • Hello Lung

    Did you check MS resources for the header file?

    Regards
    Amit
  • Where to find "MS resources"

  • Hello Lung

    MS = MicroSoft

    Regards
    Amit
  • Hi Amit,
    Thank first, I search "Program Files" especially in "Microsoft Visual Studio 10.0", but can't find usb.h.
    In ccs5 folder, I find a usb.h, but it look like for ccs MSP430, not for Microsoft.

    This is the file header:
    // (c)2009 by Texas Instruments Incorporated, All Rights Reserved.
    /*----------------------------------------------------------------------------+
    | |
    | Texas Instruments |
    | |
    | MSP430 USB-Example (CDC/HID/MSC Driver) |
    | |
    +-----------------------------------------------------------------------------+
    | Source: Usb.h, File Version 1.04 2010/10/30 |
    | Author: RSTO |
    | |
    | WHO WHEN WHAT |
    | --- ---------- ------------------------------------------------ |
    | RSTO 2008/09/03 born |
    | RSTO 2008/12/23 enhancements of CDC API |
    | RSTO 2009/05/15 changed USB_connectionStatus() |
    | to USB_connectionInfo() |
    | RSTO 2009/05/26 remove kUSB_failedEnumEvent |
    | RSTO 2009/07/17 added __data16 qualifier for USB buffers |
    | MSP,Biju 2009/10/20 Composite support changes |
    | RSTO 2009/11/05 added event ST_NOENUM_SUSPENDED |
    | MSP,Biju 2009/12/28 macros DESC_TYPE_IAD added due to IAD |
    | support |
    | RSTO 2010/10/30 added kUSB_allXXXEvents |
    +----------------------------------------------------------------------------*/

    #ifndef _USB_H_
    #define _USB_H_

    #ifdef __cplusplus
    extern "C"
    {
    #endif

    Best regards,
    NgLT
  • Hello Lung,

    I think, it was from sourceforge.net that you need to install the library.

    sourceforge.net/.../

    Regards
    Amit
  • Hi Amit,

    I download "libusb-win32-bin-1.2.6.0" and install it. I find that the program is for generating USB driver, not a library, and there is no folder: libusb-win32\include\ or header file: usb.h.

    Best regards,
    NgLT
  • Hello NgLT,

    Is the define USE_WINUSB defined in your work flow?

    Also I downloaded the source code from sourceforge and the file is renamed to lusb0_usb.h under include directory.

    Regards
    Amit