I’ve just created my first model, deployed it for Arduino IDE, and was about to compile it to my ESP32-CAM, but then I get these errors saying that the fmin and fmax are not a member of ‘std’. I’ve attached a picture that shows the error message.
I’ve already checked and read this long discussion ESP32 CAM Support where another user experienced the same thing. I’ve tried all the ways to fix this issue that were mentioned in the forum in the best of my abilities, like adding the “|| defined(ARDUINO)”, changing “fmax” to just “max” (same with fmin), and other ways, but I rather get this error, or being prompted by another one.
I had the same error. The solution was to change a little bit the file
…\tensor_utils_common.cpp. This file in the folder of the library that Edge Impulse creates
const double rmin = std::fmin(0, *(minmax.first));
const double rmax = std::fmax(0, *(minmax.second));
const double rmin = fmin(0, *minmax.first);
const double rmax = fmax(0, *minmax.second);
The problem is because the functión fmin and fmax are not include in std but they are in so I use them from that library
Hey Louis thanks for the reply, sorry it took me so long to respond. I applied the solution Jesus_A_Lopez gave and it worked. However, I also considered what you said about the example being deprecated so to avoid any problems in the future, I started using the example provided by the library for the ESP32.
I encountered another problem, though I forgot what it was specifically, something about some things not being declared or something. However turns out I just needed to install the latest version of the ESP32 in the boards manager of the Arduino IDE. I was still using a 1.6 version, and once I updated to 2.0.8, the provided example in the library worked perfectly without any issues.
a bit unrelated with my original post, but I hope this helps other people