Include files problem

Hi,
I have a stepper.cpp file and I want to call some functions which exist in linkedList.cpp which also has a header file linkedList.h

so in PIO.ini (for the stepper project) I included the lib_extra_dirs line as below (directory copied from Windows explorer), but the code won’t complile, it doesn’t seem to find the .h file

should I do this a different way perhaps?

thanks for help.

Compiler output extract:

src\Stepper.cpp:31:10: fatal error: linkedList.h: No such file or directory
Compiling .pio\build\ATmega4809\FrameworkArduino\Tone.cpp.o

********************************************************************
* Looking for linkedList.h dependency? Check our library registry!

PIO.ini

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

[env:ATmega4809]
board = ATmega4809
platform = atmelmegaavr
framework = arduino
board_build.variant = 40pin-standard
board_build.f_cpu = 20000000L
monitor_flags = 
	--echo
upload_protocol = custom
upload_speed = 115200
upload_port = COM17
upload_flags = 
	-d
	atmega4809
	-c
	$UPLOAD_PORT
	-b
	$UPLOAD_SPEED
upload_command = pyupdi $UPLOAD_FLAGS -f $SOURCE
lib_extra_dirs = 
    C:\Users\Paul\Documents\PlatformIO\Projects\Development\Circular-Linked-List\include\

monitor_port = COM17
monitor_speed = 19200
lib_deps = waspinator/AccelStepper@^1.61

[platformio]
description = The integrated Stepper Driver


It looks like you’ve pointed lib_extra_dirs directly into the include folder of the library. That’s wrong when using that directive – as the documentation says

This is a not direct path to a library with source code. It should be a path to storage that contains libraries grouped by folders. For example, D:\PlatformIO\extra\libraries but not D:\PlatformIO\extra\libraries\FooLibrary.

So you should try to add the Development folder to the lib_extra_dirs so that the LDF finds the usage of the Circular-Linked-List library (this shows up in the dependency graph too).

lib_extra_dirs = 
    C:\Users\Paul\Documents\PlatformIO\Projects\Development

ah thanks, I should’ve read the stuff first :frowning: I’ll give it a try.