The files provided are not sufficient for testing as there are other dependencies which are not listed. Please provide a simplified project that only refers to the problem and can be compiled on its own.
I am unable to reproduce your project because of missing files and dependencies. It would be much more easy for me to have the complete project - including your platformio.ini.
In addition your project is a bit strange about your library setup. It would be really much more easy to have either the complete project or a bare minimal project to reproduce the error.
Can you make the folder structure such that you just have
TOF
- TOF.cpp
- TOF.h
(single level) and the Adafruit VL6180x (master) library just inserted via lib_deps?
PlatformIO might get confused because the Adafruit_VL6180X-master folder has the actual library.properties or library.json, so it may never even compile TOF.cpp.
thx. Moving it to seperate folders worked! (Even though I have similar folders that work)
I’ll set up a github repository next time with the important files. (Will be more work but better than not fixing the error)
I also have no idea how lib_deps works (Should I learn it?)
lib_deps is just a list of libraries from either the PlatformIO registry or straight URLs (github, zip files, etc.) which point to libraries you want PlatformIO to compile with your project.