Keep error of missing library files, why?

Hi everyone.
The sketch below compiling keep getting errors, how to do?
Thanks
adam

#include "config.h"
#include <Arduino.h>
#ifdef ENABLE_DISPLAY
#include <TFT_eSPI.h>
#endif
#include "SiRFGPS.h"

#ifdef USES_SIRF
SiRFGPS *gps;
#else
GPS *gps;
#endif
#ifdef ENABLE_DISPLAY
TFT_eSPI display;
#endif

void setup()
{
  Serial.begin(115200);
#ifdef ENABLE_DISPLAY
  display.begin();
  display.setRotation(1);
  display.fillScreen(0);
  display.setCursor(0, 0, 2);
  display.setTextColor(TFT_WHITE, TFT_BLACK);
  display.setTextSize(1);
#endif
#ifdef USES_SIRF
  gps = new SiRFGPS(GPS_SERIAL, GPS_TX, GPS_RX, GPS_ENABLE);
  gps->begin();
#else
  gps = new GPS(GPS_SERIAL, GPS_TX, GPS_RX);
  gps->begin(GPS_BAUD);
#endif
}

void loop()
{
  Serial.printf("%s\n", gps->get_fix().toString().c_str());
#ifdef ENABLE_DISPLAY
  display.fillScreen(0);
  display.setCursor(0, 0, 2);
  Serial.printf(gps->get_fix().toString().c_str());
  display.println(gps->get_fix().toString().c_str());
  display.fillScreen(0);
  display.setCursor(0, 0, 2);
  display.printf("Tracking %d of %d visible\n", gps->get_tracking_satellites(), gps->get_visibile_satellites());
  display.printf("Status: %s\n", gps->get_status() == 'A' ? "LOCK!" : "SEARCHING...");
  display.printf("Time: %s\n", gps->get_fix().timestamp.toString().c_str());
  display.printf("Lat: %f\n", gps->get_fix().latitude);
  display.printf("Lng: %f\n", gps->get_fix().longitude);
  display.printf("Speed: %f\n", gps->get_fix().speed);
  display.printf("Almanac: %.1f%% complete\n", gps->get_fix().almanac.percentComplete());
#endif
  delay(5000);
}

error1:

In file included from C:\Users\HUA.DELLV-PC\Documents\Arduino\libraries\include

\LwipDhcpServer.cpp:50:0:C:\Users\HUA.DELLV-PC\Documents\Arduino\libraries\include\user_interface.h:34:2: 

error: #error LWIP_OPEN_SRC must be defined #error LWIP_OPEN_SRC must be defined  ^C:\Users

\HUA.DELLV-PC\Documents\Arduino\libraries\include\LwipDhcpServer.cpp:54:26: fatal error: sys/pgmspace.h: 

No such file or directorycompilation terminated.exit status 1Error compiling for board ESP32 Dev Module.

found pgmspace.h and put into sys got:
error2:

C:\Users\HUA.DELLV-PC\Documents\Arduino\libraries\include\StackThunk.cpp:35:40: fatal error: 

umm_malloc/umm_heap_select.h: No such file or directorycompilation terminated.exit status 1Error compiling for 

board ESP32 Dev Module.

found umm_heap_select.h and put into umm_malloc then still got:

C:\Users\HUA.DELLV-PC\Documents\Arduino\libraries\include\StackThunk.cpp:35:40: fatal error: umm_malloc/umm_heap_select.h: No such file or directory

compilation terminated.

exit status 1

Error compiling for board ESP32 Dev Module.

some time got another one error.
How to fix this please.

What is in config.h? This seems to be a local (to you) file.

1 Like

Thanks.
it is.

#include "Arduino.h"

// Are you using a GPS that uses the SiRF protocol and needs switching to NMEA?
#define USES_SIRF 1

// Does your SiRF GPS need to be enabled? Set to -1 if not required
#define GPS_ENABLE GPIO_NUM_27

// GPS baud rate - only required for NMEA GPS boards
#define GPS_BAUD 9600

// Which pins have you got your TX and RX lines connected to?
#define GPS_RX GPIO_NUM_13
#define GPS_TX GPIO_NUM_12

// which hardware serial do you want to use? Serial1, Serial2, Serial3
#define GPS_SERIAL Serial1

// enable the TTGO display
#define ENABLE_DISPLAY

These library files are referencing other library files. There should be a folder (or tree) with all the required files.

You do not have an issue with a missing library:
What I see:

  1. You have a problem to define and set a macro (e.g. in GUI as preprocessor macro:
    This:
    error: #error
    means: somewhere in your source code is a check for a macro defined properly. If not (or wrong value for it) - it fires this #error warning
    Check if you have the macro defined (somewhere, in C-code or also as GUI preprocessor macro, or if it conflicts with some other configs

  2. umm_malloc/umm_heap_select.h: No such file
    means: this H-file is not found:
    a) it does not exist, a wrong file name
    b) but more likely: you have to set a path in GUI (the -I option) where to look/search for H-files

All your errors tell you:

  • something missing:
    a) a macro definition or a macro with correct value
    b) a H-file to be included, but cannot be found via the -I IncludePath directive
    (BTW: often the GUI will show you if this file can be found, if not, the line is marked when the file would be missing)

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