[solved] Esp32: Problem during compiling

Hello world.
I'm using the Arduino IDE for a project with an esp32 board.
When I try to compile an error occurs. It seems, there is an issue with the Arduino.h. However I didn't touch it.

Arduino: 1.8.19 (Windows 10), Board: "ESP32 Wrover Module, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), QIO, 80MHz, 921600, None"

In file included from sketch\sketch_test.ino.cpp:1:0:

..\Arduino15\packages\esp32\hardware\esp32\2.0.4\cores\esp32/Arduino.h:183:12: error: 'std::round' has not been declared using std::round;
            ^
exit status 1

If I'm wrong in this subforum please redirect me.

Done, sounds more like a programming question.

Hello @carsten0501

welcome to the arduino-forum.

The error-message quotes a filename sketch_test.ino.cpp

This filename seemd odd to me. When working with the Arduino-IDE your sketch must have the extension .ino not .cpp

you should post your sketch using this method

There is an automatic function for doing this in the Arduino-IDE
just three steps

  1. press Ctrl-T for autoformatting your code
  2. do a rightclick with the mouse and choose "copy for forum"
  3. paste clipboard into write-window of a posting

best regards Stefan

Sketch has the extension .ino.
Don't know what the problem was, but it is solved.
I uninstalled Arduino IDE and deleted the ..\Arduino15\ folder manually.
After a fresh install of the IDE the sketch compiles.

Hi,
if your problem has been solved, do a kindness to everyone on the forum, especially to those who helped you.
Write [Solved] before your topic title, and if it was solved by some help, tick the one that best describes your solution.

I'm running IDE v1.8.19 and attempting to compile the Examples, 01.Basic, Blink sketch for my ESP32. My IDE has been working for years until about a week ago when I started getting the same error as carsten0501. I've been working with the Adafruit folks for the past few days and they confirm it is not a hardware error so I'm left with something related to the ESP32 library (ESP32 board v1.0.6). Any suggestions would be welcome.

I don't have an ESP32; maybe something in those google results will help you: arduino esp32 error: 'std::round' has not been declared using std::round; - Google Search

I've been searching Google for over a week and there are a few experiencing this issue but no solutions identified; hence, why I posted here.

I can compile sketches for my ESP8266 so clearly the issue is with the ESP32 library.

Observing the same issues here with the ESP32 board v1.0.6 library installed and IDE v1.8.19 (on MacOs Monterey).
Using Arduino frequently for ESP8266, Adafruit M0, Arduino - boards, this error only appears for the ESP32...
As I have developed before with the ESP32 and only now this behaviour occurs, This suggests to be due to the library-update ESP v1.0.6.

Completely removing Arduino and re-installing everything does not solve this

Why are you guys using such an old ESP32 Arduino core? The latest version is 2.0.4.

So, why are you using 1.0.6?

That is the newest version listed... I was also provided this link to add to my Preferences Board Manager URL:
https://dl.espressif.com/dl/package_esp32_index.json

Is this the correct link?

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

3 Likes

Gfvalvo, you the man! Changing the URL allowed me to install 2.0.4 and my compiling error has been resolved. Much thanks!

3 Likes

Thnx for this. I got the correct repository, but only upto version 1.0.6 was showing..

I needed to add the development branch (../package_esp32_dev_index.json) of this packet to get version 2.0.4

The error is now gone, Thnx again!

2 Likes

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