I am getting the following error code when I compile our code using the esp32c3 cmake file:
.espressif\tools\riscv32-esp-elf\1.24.0.123_64eb9ff-8.4.0\riscv32-esp-elf\riscv32-esp-elf\include\c++\8.4.0\cstdlib:232:11: error: '::strtold' has not been declared
using ::strtold;
My code has a combination of .c & .c++ files. The above error message shows up in all the files. I am using IDF v4.3(stable released version). I am already doing the foll. in my code:
#ifdef __cplusplus
extern "C"
{
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include
}
#endif
Any thoughts on how to resolve this error?
esp32-c3 compile time error
Re: esp32-c3 compile time error
Try removing the extern "C" guards totally and include the C++ versions of these headers:
EDIT: I'm not able to reproduce this with just the snippet of code you posted. Can you give a source file that's enough to reproduce the error, and also the full build output when it fails? Thanks.
Code: Select all
#include <cstdio>
#include <cstring>
#include <cstdlib>
Re: esp32-c3 compile time error
Removed the C guards and replaced the header files with C++ header files however still having that issue.
It is part of our platform code hence cannot share it here however I created a small project with the files from which I was getting the error message but was not able to recreate it.
Any other ideas on how to resolve the error?
It is part of our platform code hence cannot share it here however I created a small project with the files from which I was getting the error message but was not able to recreate it.
Any other ideas on how to resolve the error?
Who is online
Users browsing this forum: No registered users and 186 guests