Fatal error: cstdint: No such file or directory

Hello @aggarg ,
As you suggested I used target_sources and updated all files. Thanks for the solution and I guess I have come out of that Undefined reference to *** error.

However now these header files in the library are not able to locate basic libraries like

#include "lwip/sockets.h"
#include "lwip/dns.h"
#include "lwip/netdb.h"
#include "lwip/igmp.h"

#include "esp_wifi.h"
#include "esp_system.h"
#include "esp_event.h"
#include "esp_event_loop.h"
#include "nvs_flash.h"
#include "soc/rtc_periph.h"
#include "esp32/rom/cache.h"
#include "esp_log.h"
#include "esp_spi_flash.h"
#include "esp_intr_alloc.h"

It shows the following error

 fatal error: lwip/sockets.h: No such file or directory
 #include "lwip/sockets.h"
compilation terminated.

Not sure why this is happening though.

What other changes you made that can introduce this? You need to ensure that you are specifying 2 information in CMakeLists.txt:

  1. List of source files to compile which is done using target_sources.
  2. List of directories where the compiler tries to find include files - this is done using target_include_directories.

The only other thing I can suggest is to try a clean build.