I am facing issues with resolving include paths in PlatformIO while trying to use the GuruxDLMS library for my ESP8266 project. I have encountered errors related to include paths and missing files. Despite following standard procedures for setting up libraries, I am unable to get the correct paths to work in Visual Studio Code.
- Library Setup:
- I have downloaded the GuruxDLMS library from GuruxDLMS GitHub.
- I placed the
.h
and.cpp
files in thelib/GuruxDLMS
directory of my PlatformIO project. - Configuration:
- In
platformio.ini
, I added the following configuration:
[env:esp01_1m]
platform = espressif8266
board = esp01_1m
framework = arduino
lib_extra_dirs = path/to/GuruxDLMS.c
lib_deps =
${PROJECT_DIR}/lib/GuruxDLMS
build_flags =
-I${PROJECT_DIR}/lib/GuruxDLMS/include
upload_speed = 115200
monitor_speed = 9600
board_build.flash_mode = dout
board_build.ldscript = eagle.flash.1m.ld
upload_port = COM5
Include Errors: Cannot open source file "../ArduinoIgnore.h"
and Cannot open source file "include/gxignore.h"
This is the link : GitHub - Gurux/GuruxDLMS.c: Gurux DLMS library for ANSI C
in this file, everything is connected, so i created folder GuruxDLMS in project lib, and add two folders (include, src). In the include i copied every .h, and in the src i copried .c/.cpp. and it doesn’t work.