Esp_netif_type.h no such file or directory

hello, in my IoT project, when i compiled the sketch this error 'esp_netif_type.h no such file or directory' was obtained. Any help to solve it please?
i am using these libraries that are installed properly from ESP by espressif

#include <WiFi.h>
#include <WebServer.h>
#include <WebSocketsServer.h>
#include <Wire.h>
#include <ArduinoJson.h>
#include <SPIFFS.h>

if the code is necessary to debug the problem i will upload upon request

Missing library, probably this one (??) --
GitHub - espressif/esp-idf: Espressif IoT Development Framework. Official development framework for Espressif SoCs.

i already installed it, but the error still exists.
This is not a library, but libraries use it internally.

it is a header file, due to a missing or incorrectly installed library, but don't know how to solve it

Hi @naseemaa. I'm going to ask you to provide the full verbose output from a compilation.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Select File > Preferences... (or Arduino IDE > Settings... for macOS users) from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Check the box next to "Show verbose output during: ☐ compile" in the "Preferences" dialog.
  3. Click the "OK" button.
    The "Preferences" dialog will close.
  4. Select Sketch > Verify/Compile from the Arduino IDE menus.
  5. Wait for the compilation to fail.
  6. You will see a "Compilation error: ..." notification at the bottom right corner of the Arduino IDE window. Click the "COPY ERROR MESSAGES" button on that notification.
  7. Open a forum reply here by clicking the "Reply" button.
  8. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
    Code block icon on toolbar
  9. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the compilation output into the code block.
  10. Move the cursor outside of the code block markup before you add any additional text to your reply.
  11. Click the "Reply" button to post the output.

In case the output is longer than the forum software will allow to be added to a post, you can instead save it to a .txt file and then attach that file to a reply here:

  1. Open any text editor program.
  2. Paste the copied output into the text editor.
  3. Save the file in .txt format.
  4. Open a forum reply here by clicking the "Reply" button.
  5. Click the "Upload" icon (Upload icon) on the post composer toolbar:
    Upload icon on toolbar
    The "Open" dialog will open.
  6. Select the .txt file you saved from the "Open" dialog.
  7. Click the "Open" button.
    The dialog will close.
  8. Click the "Reply" button to publish the post.

Alternatively, instead of using the "Upload" icon on the post composer toolbar as described in steps (5) - (7) above, you can simply drag and drop the .txt file onto the post composer field to attach it.

loading library from c:\Users\ASUS\Documents\Arduino\libraries\FS1: invalid library: no header files foundloading library from c:\Users\ASUS\Documents\Arduino\libraries\arduino-esp32-master: invalid library: no header files found
FQBN: arduino:renesas_uno:unor4wifi
Using board 'unor4wifi' from platform in folder: C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0
Using core 'arduino' from platform in folder: C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0

Detecting libraries used...
C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -c -w -Os -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -std=gnu++17 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -w -x c++ -E -CC -DARDUINO=10607 -DPROJECT_NAME="C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD/IoT_AruinoR4_GRBLvWEB.ino" -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE=700 -mthumb @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/defines.txt -DCFG_TUSB_MCU=OPT_MCU_RAXXX -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/tinyusb -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated-avr-comp -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4 -iprefixC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0 @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/includes.txt C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD\sketch\IoT_AruinoR4_GRBLvWEB.ino.cpp -o nul
Alternatives for WiFi.h: [WiFi@2.0.0 WiFiNINA@1.8.14 WiFiS3@0.0.0]
ResolveLibrary(WiFi.h)
  -> candidates: [WiFi@2.0.0 WiFiNINA@1.8.14 WiFiS3@0.0.0]
C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -c -w -Os -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -std=gnu++17 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -w -x c++ -E -CC -DARDUINO=10607 -DPROJECT_NAME="C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD/IoT_AruinoR4_GRBLvWEB.ino" -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE=700 -mthumb @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/defines.txt -DCFG_TUSB_MCU=OPT_MCU_RAXXX -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/tinyusb -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated-avr-comp -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4 -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\libraries\WiFiS3\src -iprefixC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0 @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/includes.txt C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD\sketch\IoT_AruinoR4_GRBLvWEB.ino.cpp -o nul
Alternatives for WebServer.h: [WebServer@2.0.0]
ResolveLibrary(WebServer.h)
  -> candidates: [WebServer@2.0.0]
C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -c -w -Os -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -std=gnu++17 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -w -x c++ -E -CC -DARDUINO=10607 -DPROJECT_NAME="C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD/IoT_AruinoR4_GRBLvWEB.ino" -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE=700 -mthumb @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/defines.txt -DCFG_TUSB_MCU=OPT_MCU_RAXXX -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/tinyusb -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated-avr-comp -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4 -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\libraries\WiFiS3\src -Ic:\Users\ASUS\Documents\Arduino\libraries\WebServer\src -iprefixC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0 @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/includes.txt C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD\sketch\IoT_AruinoR4_GRBLvWEB.ino.cpp -o nul
Alternatives for FS.h: [FS@2.0.0]
ResolveLibrary(FS.h)
  -> candidates: [FS@2.0.0]
C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -c -w -Os -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -std=gnu++17 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -w -x c++ -E -CC -DARDUINO=10607 -DPROJECT_NAME="C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD/IoT_AruinoR4_GRBLvWEB.ino" -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE=700 -mthumb @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/defines.txt -DCFG_TUSB_MCU=OPT_MCU_RAXXX -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/tinyusb -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated-avr-comp -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4 -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\libraries\WiFiS3\src -Ic:\Users\ASUS\Documents\Arduino\libraries\WebServer\src -Ic:\Users\ASUS\Documents\Arduino\libraries\FS\src -iprefixC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0 @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/includes.txt C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD\sketch\IoT_AruinoR4_GRBLvWEB.ino.cpp -o nul
Alternatives for Network.h: [Networking@1.0.0]
ResolveLibrary(Network.h)
  -> candidates: [Networking@1.0.0]
C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4/bin/arm-none-eabi-g++ -c -w -Os -g3 -fno-use-cxa-atexit -fno-rtti -fno-exceptions -nostdlib -DF_CPU=48000000 -DNO_USB -DBACKTRACE_SUPPORT -DARDUINO_UNOR4_WIFI -std=gnu++17 -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -fno-builtin -w -x c++ -E -CC -DARDUINO=10607 -DPROJECT_NAME="C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD/IoT_AruinoR4_GRBLvWEB.ino" -DARDUINO_UNOWIFIR4 -DARDUINO_ARCH_RENESAS_UNO -DARDUINO_ARCH_RENESAS -DARDUINO_FSP -D_XOPEN_SOURCE=700 -mthumb @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/defines.txt -DCFG_TUSB_MCU=OPT_MCU_RAXXX -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/tinyusb -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino/api/deprecated-avr-comp -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\cores\arduino -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4 -IC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\libraries\WiFiS3\src -Ic:\Users\ASUS\Documents\Arduino\libraries\WebServer\src -Ic:\Users\ASUS\Documents\Arduino\libraries\FS\src -Ic:\Users\ASUS\Documents\Arduino\libraries\Network\src -iprefixC:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0 @C:\Users\ASUS\AppData\Local\Arduino15\packages\arduino\hardware\renesas_uno\1.1.0\variants\UNOWIFIR4/includes.txt C:\Users\ASUS\AppData\Local\Temp\arduino\sketches\3D4F4617131A828F9E0436798DB2D3CD\sketch\IoT_AruinoR4_GRBLvWEB.ino.cpp -o nul
Alternatives for esp_netif_types.h: []
ResolveLibrary(esp_netif_types.h)
  -> candidates: []
In file included from c:\Users\ASUS\Documents\Arduino\libraries\Network\src/Network.h:8:0,
                 from c:\Users\ASUS\Documents\Arduino\libraries\WebServer\src/WebServer.h:29,
                 from C:\Users\ASUS\Desktop\Graduation Project\Graduation_Project_Implementation\IoT_AruinoR4_GRBLvWEB\IoT_AruinoR4_GRBLvWEB.ino:2:
c:\Users\ASUS\Documents\Arduino\libraries\Network\src/NetworkInterface.h:8:10: fatal error: esp_netif_types.h: No such file or directory
 #include "esp_netif_types.h"
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1

Compilation error: exit status 1

You are compiling for the UNO R4 WiFi board, which uses a Renesas RA4M1 microcontroller, but attempting to use libraries that are written for the ESP32 family of microcontrollers. That won't work.

You must use the "WiFiS3" library which you already installed as part of the board's "Arduino UNO R4 Boards" platform via the Arduino IDE Boards Manager.

You can learn about using the "WiFiS3" library from the tutorial here:

https://docs.arduino.cc/tutorials/uno-r4-wifi/wifi-examples/

Please tell me where you got the "Networking" library you have installed at this location on your computer:

c:\Users\ASUS\Documents\Arduino\libraries\Network

I don't find any library of that name in the Arduino IDE Library Manager, so you must have manually downloaded the library from the Internet and then installed it.

I haven't downloaded the Network library explicitly, it seems that it was installed with other libraries.
and now i will check the WiFiS3 tutorials, and see what will happen.

and I was wondering if I replaced the Arduino R4 with an esp32 (nodemcu-32s), will the error be fixed?

The ESP32 boards are very nice and it is worthwhile for anyone significantly involved in creating Arduino projects to have at least one on hand. However, I don't think it makes sense to buy a whole new board solely because you have a problem with the libraries installed on your computer. With a little bit of concerted effort you will likely be able to solve that problem before the ESP32 board had even been delivered to you.

You can check if you like. Although you must own the board in order to upload your sketch, this is a compilation error and you can compile your sketch for any one of the thousands of boards in the Arduino ecosystem whether you own the hardware or not.

I'll provide instructions you can follow to do that:

  1. Open your sketch in Arduino IDE.
  2. Select Tools > Board > Boards Manager... from the Arduino IDE menus to open the "Boards Manager" view in the left side panel.
  3. Scroll down through the list of boards platforms until you see the "esp32" entry.
  4. Click the "INSTALL" button at the bottom of the entry.
  5. Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:

    Successfully installed platform ...

  6. Select Tools > Board > ESP32 Dev Module" from the Arduino IDE menus.
  7. Select Sketch > Verify/Compile from the Arduino IDE menus.

Arduino IDE will now compile the sketch for an ESP32 board. The outcome of the compilation will tell you whether the same compilation error occurs when compiling for the ESP32 board.

I have the esp32 chip it is with me. But, I want now I am interested in compiling this for RR4 boards successfully. I knew it is library issues and I am not knowing what exactly to remove and what to keep.

Libraries that are included in my code are all installed and found in the libraries folder, but I am not knowing what is the networking.h, I have a file in libraries named Network, but it doesnt have networking.h

And I really want to fix this problem as soon as possible.

This #include directive was intended to target the "WiFi" library that is bundled with the "esp32" boards platform, which is incompatible with the UNO R4 WiFi board. In order to ensure the compatible library is used, change that line to this:

#include <WiFiS3.h>

Fortunately both libraries have a fairly similar API so you might find that no additional changes are required in sketch code that was originally written for use with the "esp32" boards platform's "WiFi" library.

This #include directive was intended to target the "WebServer" library that is bundled with the "esp32" boards platform, which is not available for the UNO R4 WiFi board.

You must remove this #include directive and replace all code in your sketch that uses the library.

From a quick search it appears this is intended to target the 3rd party "WebSockets" library?:

This library is incompatible with the UNO R4 WiFi board. You must remove this #include directive and replace all code in your sketch that uses the library.

This library is available as part of the "Arduino UNO R4 Boards" platform so any code in your sketch using this library should work fine with the UNO R4 WiFi board.

This library is compatible with all Arduino boards so any code in your sketch using this library should work fine with the UNO R4 WiFi board.

This #include directive was intended to target the "SPIFFS" library that is bundled with the "esp32" boards platform, which is not available for the UNO R4 WiFi board.

You must remove this #include directive and replace all code in your sketch that uses the library.

As a conclusion, I should replace these libraries, with Arduino R4 compatible libraries, right?

If such libraries are available, yes. But simply swapping out some libraries isn't enough. You must also adjust your sketch code. In order to do that, you must have a good understanding of the sketch code and the libraries you are using.

So you'll need to roll up your sleeves and get to work studying the documentation and writing code. If you get stuck or have specific questions while doing that, you can come back here to the forum and provide a detailed description of your problem or doubt as well as the latest version of your code. The forum helpers can then provide some assistance.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.