Closed blmhemu closed 3 years ago
Hi,
Can you try to add -DARDUINO to your project defines?
The conflict happens because you're using aduino-esp32 which has arduino API, but the library is being compiled as library for ESP32-IDF
Thanks for the quick response!
After I added -D ARDUINO
I got the above error
Actually, I am using both Arduino AND esp-idf (Both of them as the project is dependent on some Arduino libs)
Here is my new platformio.ini
[env]
platform = espressif32
framework = arduino, espidf
build_flags =
-D CONFIG_BLINK_GPIO=25
-D ARDUINO
monitor_speed = 115200
platform_packages =
framework-arduinoespressif32 @ https://github.com/marcovannoord/arduino-esp32.git#idf-release/v4.0
[env:heltec_wifi_lora_32_V2]
board = heltec_wifi_lora_32_V2
lib_deps = lexus2k/lcdgfx@^1.1.0
Also I was able to get it to working if I remove #include <Arduino>
and the related code.
Please, find the fix on the master branch (latest commit), ARDUINO define is not required.
Greetings ! @lexus2k That was a nice fix. The problem can be marked as resolved In master. Eager to see it in the new release!
Also, there are a lot of warnings during compiling (fortunately none are fatal)
My guess is that some items are being redefined in both libs.
Once again thanks for the quick fix!
Describe the bug Cannot build using the library.
To Reproduce
#include "lcdgfx.h"
in the main.cppExpected behavior Program should build
Screenshots Looks like the attach interrupt in being exported by two libraries (esp-arduino and this lib) ?
Please complete the following information:
Additional context None