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.
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?
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.