[Solved] Add lib to project, but does not include

SOLVED: did not select the proper project folder (in the folder selector).
Stuff that happens, when things change for occasional users :smiley:


  • Linux Mint 20.1
  • VScode: 1.57.1
  • PIO 5.5.1 / 3.3.4

I created a project for the Arduino UNO… code is now too big, so I created another project, this time for the MEGA.

I need the TinyGPS++ library, and included it for the MEGA, as I did for the UNO; however, the #include <TinyGPS++.h> has a red twiggly line under it.

When I compare the project folders, the MEGA looks like the UNO file structure:

The only difference between the two is that the UNO folder has three libraries, the MEGA has one.

The platformio.ini files do have the reference (auto-created when importing the lib).

platform = atmelavr
board = megaatmega2560
framework = arduino
upload_port = /dev/ttyUSB2
monitor_speed = 115200
lib_deps = mikalhart/TinyGPSPlus@^1.0.2

I have no idea how to fix this. Any hints appreciated.

but it compiles w/o errors; but only when using pio run in the MEGA project folder; otherwise it compiles it as UNO (puzzled; no longer puzzled, using the “project selector” and point it to the MEGA folder solved it).


I did not select the proper project folder!!

Solved per above (placeholder post).