Time to do a new project…
So I call PIO home in VScode, create new project, Arduino UNO… source… add library… oops… the first thing I noticed, PIO no longer offers an install button when wanting to install a library. Instead it says “add to project”.
But this is not what I want. I want the library to be available ‘globally’. When I create variants of the project, I would not like multiple libraries of the same thing.
Has something changed, say during the last six month; because before that I could add a library globally.
Anyway, I gave adding the library to the project a go, and compiling failed because it could not find another library it seems to require (SoftwareSerial.h) … however, it is a built in library.
Why is it not found?
Does the include path need to be modified?
What am I missing? Or doing wrong?
[edit 1]
Changed the title: Coming back after 6 month: has the library management changed?
to: SoftwareSerial.h not being found/included in compile
Well, I should have checked earlier… I opened older project folders and they have .pio/libdeps/subdirectories for whatever libraries.
Still, why is the SoftwareSerial.h not being picked up being a built-in library?
I even installed it for the project; still complains about missing SoftwareSerial.h.
[end edit 1]
[edit 2]
I thought it might be helpful to include the compile messages:
Processing uno (platform: atmelavr; board: uno; framework: arduino)
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/uno.html
PLATFORM: Atmel AVR (3.3.0) > Arduino Uno
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 31.50KB Flash
DEBUG: Current (avr-stub) On-board (avr-stub, simavr)
PACKAGES:
- framework-arduino-avr 5.1.0
- toolchain-atmelavr 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 25 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <Adafruit GPS Library> 1.5.4
| |-- <SPI> 1.0
| |-- <Wire> 1.0
|-- <SoftwareSerial> 1.0
Building in release mode
Compiling .pio/build/uno/libfad/Adafruit GPS Library/Adafruit_GPS.cpp.o
Compiling .pio/build/uno/libfad/Adafruit GPS Library/NMEA_build.cpp.o
Compiling .pio/build/uno/libfad/Adafruit GPS Library/NMEA_data.cpp.o
Compiling .pio/build/uno/libfad/Adafruit GPS Library/NMEA_parse.cpp.o
In file included from .pio/libdeps/uno/Adafruit GPS Library/src/NMEA_build.cpp:31:0:
.pio/libdeps/uno/Adafruit GPS Library/src/Adafruit_GPS.h:58:10: fatal error: SoftwareSerial.h: No such file or directory
************************************************************************
* Looking for SoftwareSerial.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SoftwareSerial.h"
* Web > https://platformio.org/lib/search?query=header:SoftwareSerial.h
*
************************************************************************
#include <SoftwareSerial.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/uno/libfad/Adafruit GPS Library/NMEA_build.cpp.o] Error 1
In file included from .pio/libdeps/uno/Adafruit GPS Library/src/Adafruit_GPS.cpp:31:0:
.pio/libdeps/uno/Adafruit GPS Library/src/Adafruit_GPS.h:58:10: fatal error: SoftwareSerial.h: No such file or directory
************************************************************************
* Looking for SoftwareSerial.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SoftwareSerial.h"
* Web > https://platformio.org/lib/search?query=header:SoftwareSerial.h
*
************************************************************************
#include <SoftwareSerial.h>
^~~~~~~~~~~~~~~~~~
In file included from .pio/libdeps/uno/Adafruit GPS Library/src/NMEA_data.cpp:38:0:
.pio/libdeps/uno/Adafruit GPS Library/src/Adafruit_GPS.h:58:10: fatal error: SoftwareSerial.h: No such file or directory
************************************************************************
* Looking for SoftwareSerial.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SoftwareSerial.h"
* Web > https://platformio.org/lib/search?query=header:SoftwareSerial.h
*
************************************************************************
#include <SoftwareSerial.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/uno/libfad/Adafruit GPS Library/NMEA_data.cpp.o] Error 1
compilation terminated.
*** [.pio/build/uno/libfad/Adafruit GPS Library/Adafruit_GPS.cpp.o] Error 1
In file included from .pio/libdeps/uno/Adafruit GPS Library/src/NMEA_parse.cpp:31:0:
.pio/libdeps/uno/Adafruit GPS Library/src/Adafruit_GPS.h:58:10: fatal error: SoftwareSerial.h: No such file or directory
************************************************************************
* Looking for SoftwareSerial.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:SoftwareSerial.h"
* Web > https://platformio.org/lib/search?query=header:SoftwareSerial.h
*
************************************************************************
#include <SoftwareSerial.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pio/build/uno/libfad/Adafruit GPS Library/NMEA_parse.cpp.o] Error 1
================================================================== [FAILED] Took 0.94 seconds ==================================================================
The terminal process "platformio 'run', '--environment', 'uno'" terminated with exit code: 1.
Terminal will be reused by tasks, press any key to close it.
[/edit 2]