1

When I am including the Adafruit_BMP280 library, Arduino IDE 1.7.10 complains that it wants all dependent libraries included:

Adafruit_Sensors.h
Wire.h
SPI.h

Isn't it possible to circumvent that? This question says to include the first library like

#include "Adafruit_BMP280"

but also with the full path, this doesn't work and just returns the same error.

1
  • You could put these includes in a separate file, and include that file? I'm not sure if that's what you mean? Or probably include them in the BM280 file? I'm actually not sure. Maybe newer versions of Arduino IDE, I don't believe I ever had to include SPI?
    – Paul
    Jun 2, 2016 at 14:49

1 Answer 1

1

No, it is not possible. The IDE needs to know which libraries you are using so that it can compile the source code for them.

Other IDEs have got around the problem by recursively scanning the libraries themselves and building up a list of dependencies (such as UECIDE) but this is not something that the Arduino IDE has been programmed to do.

The only other possible option might be to create a single massive library that contains everything that the "main" library relies on, however this may cause problems with other libraries also wanting the same things and you ending up with massive conflicts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.