PlatformIO Community

One library isn't automatically linked (Incompatible?)


I’ve got 2 libraries in the default lib folder that is generated when making a new project. One is included in the other, but only the first one is found and compiled which results in a failed compilation.
This is the compiler output:

[05/15/18 18:24:59] Processing lolin32 (platform: espressif32; board: lolin32; framework: espidf)
Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 32 > WEMOS LOLIN32
SYSTEM: ESP32 240MHz 288KB RAM (1.25MB Flash)
Library Dependency Finder ->

Collected 1 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <wifimanager>
Compiling .pioenvs\lolin32\src\main.o
src\main.c:6:22: fatal error: mongoose.h: No such file or directory
* Looking for mongoose.h dependency? Check our library registry!

* CLI  > platformio lib search "header:mongoose.h"
* Web  >
compilation terminated.
Compiling .pioenvs\lolin32\bootloaderSupport\src\secure_boot_signatures.o
Compiling .pioenvs\lolin32\bootloaderLog\log.o
*** [.pioenvs\lolin32\src\main.o] Error 1
Compiling .pioenvs\lolin32\bootloaderSPIFlash\spi_flash_rom_patch.o
 [ERROR] Took 6.60 seconds

As you can see only wifimanager is found, but the library it’s trying to include from the same lib directory, mongoose, isn’t found. I feel like the ‘compatible’ is important, but what would make a library compatible or more importantly, incompatible?

EDIT: I’m using PIO inside Atom.


What’s the folder and file structure (tree)? What’s your exact platformio.ini? Does adding the library names in lib_deps (docs) do something? Does changing the LDF mode to chain+ do something (docs)? Can you link to the exact used libraries and versions?


Ah, because of the link to the docs you provided I found the lib_comp_mode library option, which was the solution to my problems.

Strangely though, changing it from it’s default light setting to either of or strict fixed it… Wouldn’t you think that a more strict compatibility check would make it only less likely to be compatible?

Thanks anyway for the lead!


Glad that it worked out.

Assuming that off was written, then yes, that’s strange. I can’t however reproduce any of this until I’ve got your exact platformio.ini, the used libraries and a small sample code. Mongoose OS isn’t listed in PIO’s library folder and wifimanager directs to a ESP8266 library…


I’ve made a git repository for this exact project so it’s easy to replicate:

I’m using atom 1.26.1 and platformio-ide package 2.1.4

Hope this helps!