No such file or directory

I have just run the Examples / ArduinoOTA / BasicOTA on an ESP32 development board and it works fine.

I have been following an online tutorial and I am trying to merge this sketch to an existing sketch that I have by adding a few lines at a time and then compiling to check if all is OK.

My problem is, the line #include <ESPmDNS.h> fails to compile with "ESPmDNS.h No such file or directory"

Where am I going wrong?

Is the ESPmDNS installed on your PC ?

is it this one ?

if so it does include

so ESPmDNS.h is well recognized and works on your system otherwise the example would not compile.

If you get an error in another sketch, double check the syntax above this include, you might have an error there and the compiler get confused.

Feel free to share the sketch where the error happens or a minimum sketch exposing the issue.

Yes that is the example I am using and it compiles and works perfectly well.

Unless you post the actual sketch that causes the error and the full error message then it is difficult to see how more help can be given

Re-arrange the libraries' order. Some libraries are dependent on others being called, and need to be called after.

Today I tried again to compile my sketch and it compiles and runs.

I have no idea why this has happened. I did not do anything other than shut my PC down for the night.

I am wondering if I need some type of tidy up in my folder structure / Arduino IDE as I often get strange glitches mainly when compiling. I can reset my PC and come back to Arduino IDE and all is fine again.#

Any thoughts?

do you have your files / libraries on a remote hard drive (NAS, data in the cloud ?)

Perhaps you set another board when compiled the code.

No. All sketch files and libraries are saved on my SSD under Documents/Arduino

I'd say get a Mac or Linux but I'm not sure everyone would agree :slight_smile: :innocent: