PlatformIO Community

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


#1

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…


#2

Have you resolved this issue?


#3

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.


#4

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 (https://github.com/adafruit/DHT-sensor-library) and a lib featured on the Arduino website (https://playground.arduino.cc/Main/DHTLib)


#5

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: