Issue with Adafruit_BMP3XX library

I’m trying to compile a program using the Adafruit_BMP3XX library but it give me this error, lib/Adafruit_BMP3XX/src/Adafruit_BMP3XX.h:25:6: warning: “ARDUINO” is not defined, evaluates to 0 [-Wundef]
25 | #if (ARDUINO >= 100)

what can i do to fix this?
PS I’m using Particle Workbench

That’s just a warning. Is there another error in the log?

I was able to build the sample app in the Adafruit_BMP3XX library (version 1.0.0) for the Boron with both 4.x and 5.3.1 with no errors. Actually, with no warnings either.

What version of the library are you using? It’s in the project.properties file.

the message is from the Particle CLI Error Log, the library is the 1.0.0 version, I tried to compile with 5.3.1 and 4.0.2 and the same error came up

Can you share the .ino or .cpp source to your main project file?

Or, can you temporarily replace it with the bmp3xx_simpletest.ino file and see if that compiles?

I can’t send my code it’s to big,
the same error comes up compiling the bmp3xx_simpletest.
could it be a config issue with my particle workbench install?


this is the code that is causing the problem, what does it do?

It’s probably not that code because it compiles fine for me. What it most likely is is that the file that includes Adafruit_BMP3xx.h has a syntax error before the include. Or a header file included before that has something odd at the end of the file.

I’d start by creating a new project with just that library and see if that works, then try to isolate where the problem actually is.

You could also try different compilers to see if you get different errors, such as using the local compiler, or using the Particle CLI compiler instead of the Workbench cloud compiler.

so removing Adafruit_sensor (which was not needed) it compiled successfully using the cloud compiler but using the local compiler it gives the same error as before, any idea why?

If you’ve installed a library using Workbench (it’s in the project.properties file), then cloud compiles will use the official version in the project.properties file, even if you have a locally modified version in the lib directory.

Local compiles, however, always use the lib version. Depending on where the file is modified, you may need to remove directories from lib as well.

1 Like

looking at the project.properties it looks like the problem is with the LPS35HW library imported manually how could I fix this?

I reimported the the LPS35HW library and it is working,
thanks for the help.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.