How to freeze the library version when a project is completed

I have several projects done in V7 on ESP32, arduino IDE, currently progressing an older project started in V6 that was never finished, this one i changed the code to work on V8,
I would like to freeze a version when a project is completed and goes in maintenance mode without having to update the entire program when a major version change is made to the library since there is no full compatibility between versions.
This would mean local copies of the lvgl library but i cant get that to work,
Little example to test:

#include “E:/workdir/arduino/rf_generator_v8/libs/lvgl-master/lvgl.h”
void setup() {
lv_init();
}
void loop() {
lv_task_handler(); /* let the GUI do its work */
}

sketch\rf_generatorx.ino.cpp.o:(.literal._Z5setupv+0x0): undefined reference to lv_init' sketch\rf_generatorx.ino.cpp.o:(.literal._Z4loopv+0x0): undefined reference to lv_timer_handler’
sketch\rf_generatorx.ino.cpp.o: In function setup()': E:\workdir\arduino\rf_generator_v8\rf_generatorx/rf_generatorx.ino:5: undefined reference to lv_init’
sketch\rf_generatorx.ino.cpp.o: In function loop()': E:/workdir/arduino/rf_generator_v8/libs/lvgl-master/src/lv_api_map.h:37: undefined reference to lv_timer_handler’
collect2.exe: error: ld returned 1 exit status
exit status 1
Error compiling for board DOIT ESP32 DEVKIT V1.

I would recommend to look at this as this is (at least in my mind) what you need. I saw this approach in complex projects which can be used with Arduino IDE (Marlin firmware, GRBL ESP32 fw, etc.) but I did not look much in to it.

EDIT: If you find solution to this, please share that one as I will probably face same problem in the future.

I tried several approches, i cant get lvgl to work if placed in the project folders, errors all over

Arduino: 1.8.15 (Windows 10), Board: “DOIT ESP32 DEVKIT V1, 80MHz, 921600, None”

sketch\rf_generatorx.ino.cpp.o:(.literal._Z5setupv+0x0): undefined reference to `lv_init’

sketch\rf_generatorx.ino.cpp.o:(.literal._Z4loopv+0x0): undefined reference to `lv_timer_handler’

sketch\rf_generatorx.ino.cpp.o: In function `setup()’:

E:\workdir\arduino\rf_generator_v8\rf_generatorx/rf_generatorx.ino:5: undefined reference to `lv_init’

sketch\rf_generatorx.ino.cpp.o: In function `loop()’:

E:\workdir\arduino\rf_generator_v8\rf_generatorx\lvgl-master\src/lv_api_map.h:37: undefined reference to `lv_timer_handler’

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board DOIT ESP32 DEVKIT V1.

Anybody has a working method on how to add the lvgl lib outside the arduino lib folder?

How to freeze the library version when a project is completed

For some projects I create a portable install of Arduino. I add the libraries I need for that project.

Thanks Rudy, that might be a solution, will give it a go