YukMingLaw / ArduinoJoystickWithFFBLibrary

An Arduino Joystick Library With Force Feedback Feature
GNU Lesser General Public License v3.0
208 stars 55 forks source link

stm32 compile error #17

Open billydragon opened 3 years ago

billydragon commented 3 years ago

I try compile sample code for stm32 blue pill but error as follow:


In file included from e:\OneDrive\Documents\Arduino\libraries\ArduinoJoystickWithFFBLibrary\src/Joystick.h:24,
                 from C:\TEMP\arduino_modified_sketch_533235\SingleJoystickFFB.ino:1:
e:\OneDrive\Documents\Arduino\libraries\ArduinoJoystickWithFFBLibrary\src/DynamicHID/DynamicHID.h:37:12: fatal error: PluggableUSB.h: No such file or directory
   37 |   #include "PluggableUSB.h"
      |            ^~~~~~~~~~~~~~~~
compilation terminated.

Anybody can fix it? Thanks.

Valdemir-DSW commented 1 year ago

The error message you're seeing indicates that the compiler is unable to find the file "PluggableUSB.h" which is required by the "DynamicHID" library. This file is likely a part of the Arduino core library or a separate library that needs to be installed.

To resolve this issue, you can try the following steps:

Check if the "PluggableUSB" library is installed: Open the Arduino IDE and go to "Sketch" -> "Include Library" -> "Manage Libraries." In the Library Manager, search for "PluggableUSB." If it's not installed, proceed to step 2. Otherwise, if it's installed, try updating the library to the latest version if available.

Install the "PluggableUSB" library: If the "PluggableUSB" library is not installed or you couldn't find it in the Library Manager, you'll need to install it manually. Follow these steps:

Download the "PluggableUSB" library from a reliable source. You can search for it on the Arduino Library Manager website or GitHub. In the Arduino IDE, go to "Sketch" -> "Include Library" -> "Add .ZIP Library." Browse to the location where you downloaded the "PluggableUSB" library, select the ZIP file, and click "Open." The library will be imported, and you should see a confirmation message. Verify the file path: Double-check that the library "DynamicHID" is correctly referencing the "PluggableUSB.h" file in its code. Make sure the file path is accurate and matches the actual location of the library.

Restart the Arduino IDE: After installing the necessary libraries or making any changes, it's a good practice to restart the Arduino IDE to ensure that all changes take effect.

By following these steps, you should be able to resolve the "fatal error: PluggableUSB.h: No such file or directory" issue and successfully compile your code.