RadioLib: Cannot load RadioLib.h and can't #include in esp-idf on platformio

I only seem to be able to use RadioLib.h by way absolute paths; like /Users/username/Documents/PlatformIO/Projects/RobArch/.pio/libdeps/TTGO-LoRa32-v1/RadioLib/src/RadioLib.h

However, I then get this error: /Users/username/Documents/PlatformIO/Projects/RobArch/.pio/libdeps/TTGO-LoRa32-v1/RadioLib/src/BuildOpt.h:313:12: fatal error: algorithm: No such file or directory

Which I think that may contribute to the compiler not finding RadioLib.h, as I have tried all tricks to make the component visible to ESP-IDF, like adding CMakelists.txt and similar.

In BuildOpt my builds become “generic non-Arduino platform” builds, and that is when they try to include the algorithms library.

Notably, I run this an a MacOs, but I have tried with all compilers I have found (CLANG 14, GCC 13 etcetera).

Great library, I have almost gotten everything to work now, but I suppose there is always something. 😃

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 30 (30 by maintainers)

Commits related to this issue

Most upvoted comments

@nicklasb added into the root CMake and also updated the example - thanks for investigating this!

Yes, but in a parallel, and quite unrelated, discussion (https://github.com/ttlappalainen/NMEA2000_esp32/pull/12#issuecomment-1555244948) I saw this guy simply do if(ESP_PLATFORM) around the ESP stuff and the rest in the else().

I haven’t tried that myself yet, won’t have time for that until the weekend, but it seemed promising and worked for him.