Mouse.h not found

I searched this topic and found two topics, which remained unanswered… my problem is pretty much the same.

I am running VScode 1.43.2 on Linux Mint 18.3 Sylvia, and PlatformIO, version 4.3.1.

I have a simple Arduino sketch that uses Mouse.h, however, it does not compile due to Mouse.h not found.

My platformio.ini:

    [platformio]

    default_envs = sparkfun_promicro16

    [env:sparkfun_promicro16]
    platform = atmelavr
    board = sparkfun_promicro16

    lib_deps = Mouse

The Terminal says:

    # [2020-04-15 18:01] maxg@maxg-pc-mint /media/maxg/Data SSD/Data/Workspaces/PlatformIO/Projects/MouseSim_v1 $ 
    pio run -t upload -v
    Processing sparkfun_promicro16 (platform: atmelavr; board: sparkfun_promicro16; lib_deps: Mouse)
    -----------------------------------------------------------------------------------------------------------------------------------------------------------------
    CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/sparkfun_promicro16.html
    PLATFORM: Atmel AVR 2.0.0 > SparkFun Pro Micro 5V/16MHz
    HARDWARE: ATMEGA32U4 16MHz, 2.50KB RAM, 28KB Flash
    PACKAGES: 
     - tool-avrdude 1.60300.190424 (6.3.0) 
     - toolchain-atmelavr 1.50400.190710 (5.4.0)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Framework incompatible library /home/maxg/.platformio/lib/EmonLib_ID116
    Framework incompatible library /home/maxg/.platformio/lib/Ethernet_ID872
    Framework incompatible library /home/maxg/.platformio/lib/Mouse_ID890
    Framework incompatible library /home/maxg/.platformio/lib/OneWire_ID1
    Framework incompatible library /home/maxg/.platformio/lib/PubSubClient_ID89
    Framework incompatible library /home/maxg/.platformio/lib/RF24_ID433
    Framework incompatible library /home/maxg/.platformio/lib/USBHost_ID885
    Framework incompatible library /home/maxg/.platformio/lib/WiFiEsp_ID509
    Framework incompatible library /home/maxg/.platformio/lib/WiFi_ID870
    Framework incompatible library /home/maxg/.platformio/lib/cactus_io_BME280_I2C
    More details about "Library Compatibility Mode": https://docs.platformio.org/page/librarymanager/ldf.html#ldf-compat-mode
    Found 0 compatible libraries
    Scanning dependencies...
    No dependencies
    Building in release mode
    avr-g++ -o .pio/build/sparkfun_promicro16/src/main.o -c -Wno-error=narrowing -fno-exceptions -fno-threadsafe-statics -fpermissive -std=gnu++11 -Os -Wall -ffunction-sections -fdata-sections -flto -mmcu=atmega32u4 -DF_CPU=16000000L -DPLATFORMIO=40301 -DARDUINO_AVR_PROMICRO16 -Iinclude -Isrc src/main.cpp

I got this result, before I installed the Mouse library, and after I installed it.
The program I am running works in the Arduino IDE I specifically installed for this test (and was never installed on this machine before). I downloaded the Sparkfun library for the Micro Pro board, 16bit, 5V.

Reading the other two threads above do not provide any hits or solution. Any help appreciated… as it seems rather nonsensical to use PlatformIO for all my UNO developments, but not for the Micro Pro.

Probably the missingframework = arduino ?? :wink:

How do I check for this?
I have many projects using the Arduino UNO; they are all working.

Since you said you were using the platformio.ini

[platformio]

default_envs = sparkfun_promicro16

[env:sparkfun_promicro16]
platform = atmelavr
board = sparkfun_promicro16

lib_deps = Mouse

you are missing the framework = arduino line. Without a framework it won’t compile it in and also the library compatibilitly checks will fail.

3 Likes

Thank you kindly!
I added this line and it compiled w/o any error or problem.
Sometimes we do not see the forest because of the trees. :)\

1 Like