No pointer to error but not build

Hello,

I am new into the Arduino and Platformio so sorry if I do something in the wrong way… when I try to build the project - no error but build is FAILED, could the log below help resolve my problem? thanks in advance.

Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)

--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 1.11.1 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: toolchain-xtensa32 2.50200.80 (5.2.0), framework-arduinoespressif32 2.10004.191002 (1.0.4), tool-esptoolpy 1.20600.0 (2.6.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
Dependency Graph
    |-- ArduinoJson> 5.13.3
    |-- "ESP32WebServer> 1.0
    |   |-- "WiFi> 1.0
    |   |-- "FS> 1.0
    |-- "HTTPClient> 1.2
    |   |-- "WiFi> 1.0
    |   |-- "WiFiClientSecure> 1.0
    |   |   |-- "WiFi> 1.0
    |-- "Preferences> 1.0
    |-- "RTClib> 1.3.3
    |   |-- "Wire> 1.0.1
    |-- "UniversalTelegramBot> 1.1.0
    |   |-- "ArduinoJson> 5.13.3
    |-- "WiFi> 1.0
    |-- "WiFiClientSecure> 1.0
    |   |-- "WiFi> 1.0
    |-- "Wire> 1.0.1
Building in release mode
Compiling .pio\build\esp32doit-devkit-v1\src\main.cpp.o
src\main.cpp: In function 'void get_cal_value()':
src\main.cpp:187:58: warning: passing NULL to non-pointer argument 3 of 'size_t Preferences::getBytes(const char*, void*, size_t)' [-Wconversion-null]
   size_t schLen = eeprom.getBytes("dosTimers", NULL, NULL);
                                                          ^
src\main.cpp: In function 'void Task_dosingPomp(void*)':
src\main.cpp:704:138: warning: 'utime' may be used uninitialized in this function [-Wmaybe-uninitialized]
           if (dosers_Timers_[pomp].is_off == false && dosers_Timers_[pomp].is_run == false && utime >= dosers_Timers_[pomp].timeStart[i] && utime " dosers_Timers_[pomp].timeStop[i] ) {

Linking .pio\build\esp32doit-devkit-v1\firmware.elf
.pio\build\esp32doit-devkit-v1\src\main.cpp.o:(.literal._Z17handleNewMessagesi+0xa4): undefined reference to `GetTime(int)'
.pio\build\esp32doit-devkit-v1\src\main.cpp.o:(.literal._Z17handleNewMessagesi+0xa8): undefined reference to `RTC_Update()'
.pio\build\esp32doit-devkit-v1\src\main.cpp.o:(.literal._Z5setupv+0x44): undefined reference to `StartTime()'
.pio\build\esp32doit-devkit-v1\src\main.cpp.o: In function `handleNewMessages(int)':
D:\igorlab\Dropbox\Ardunio\!Programs\!Doser\DoserLab_2.1/src/main.cpp:862: undefined reference to `GetTime(int)'
D:\igorlab\Dropbox\Ardunio\!Programs\!Doser\DoserLab_2.1/src/main.cpp:862: undefined reference to `GetTime(int)'
D:\igorlab\Dropbox\Ardunio\!Programs\!Doser\DoserLab_2.1/src/main.cpp:862: undefined reference to `GetTime(int)'
D:\igorlab\Dropbox\Ardunio\!Programs\!Doser\DoserLab_2.1/src/main.cpp:862: undefined reference to `RTC_Update()'
.pio\build\esp32doit-devkit-v1\src\main.cpp.o: In function `setup()':
collect2.exe: error: ld returned 1 exit status

*** [.pio\build\esp32doit-devkit-v1\firmware.elf] Error 1

========================= [FAILED] Took 23.80 seconds =========================

These errors from the linker indicate that at the call to those functions at line 862 of your main.cpp (in a function called handleNewMessages()?), the function declaration for those functions was found (the .h / myFunc(); lines) had been found, but not the function definition (the matching .cpp / actual body the the function). Same goes for StartTime()

3 Likes

pfeerick a lot of thanks!

1 Like