[Solved] "compilation terminated" and "no such file or directory"

Im keep getting this issue: When I try to compile a file the process stops and says:

The file is originally an arduino ( C ) file, where it worked just fine. I “converted” it properly, so that shouldn’t be the problem. Also I used an example code provided by platformio in order to test if the error just occurs on my own program. But the platformIO IDE also had problem with the library that was included in the example code. At this point im out of ideas how to fix this problem on my own. Right now I cant use this nice IDE when coding with libraries…
Does someone has an idea what to do to solve this issue?

Edit: It also says “fatal error: DHT.h: No such file or directory” I also tried to install the libraries with platformio but that didn’t fix the problem…

Have you resolved this issue?

As mentioned above, I tried to solve this issue but I didnt find a solution so far.
I dont have any Experience with the platformIO IDE, so I hope someone from this Community can help.

Go to your platformio.ini file in your project and add lib_deps = DHT and re-compile. If that doesn’t fix it, search for the library source code (and its dependencies) you’re using, and download it into your lib folder and recompile. Note that there are at least two libraries which offer this DHT.h header file, Adafruit (GitHub - adafruit/DHT-sensor-library: Arduino library for DHT11, DHT22, etc Temperature & Humidity Sensors) and a lib featured on the Arduino website (Arduino Playground - DHTLib)

1 Like

Hello Max,
Thank you for your reply. Your first suggestion didn’t worked. But then I put several libraries that are needed into the lib folder/section. Fortunately it worked!
Finally i can start coding :wink: