idf-eclipse-plugin
idf-eclipse-plugin copied to clipboard
Espressif IDE 3.0.0 with idf 5.3 c++ Project `include <new>` error in windows (IEP-1306)
Describe the bug
Espressif IDE 3.0.0 with idf 5.3 c++ Project include <new> error in windows。
But it is ok with vscode in windows。and is ok in macbook too.
To Reproduce Steps to reproduce the behavior:
- in windows use Espressif IDE , creat a new project use template “sample_project”
- Rename the main.c to main.cpp
- Modify the content of main.cpp。like this
extern "C"
{
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
}
#include <new>
extern "C" void app_main(void)
{
while (true) {
printf("Hello from app_main!\n");
sleep(1);
}
}
- Modify the content of CMakeLists.txt in main floder,like this
idf_component_register(
SRCS main.cpp # list the source files of this component
INCLUDE_DIRS # optional, add here public include directories
PRIV_INCLUDE_DIRS # optional, add here private include directories
REQUIRES # optional, list the public requirements (component names)
PRIV_REQUIRES # optional, list the private requirements
)
- The purpose of steps 2、3 and 4 is to support C++ for project
- then buid。 it will have Error message: “new file not found”,like this
If you use the same steps use vscode in windows or use espressif ide in macbook,it will be fine,build successfull。 I think should be some think wrong with espressif ide in windows
This is my test project file: https://github.com/LonlyPan/esp32_lvgl_test_with_flow/tree/main/test2
I alse test Espressif IDE 3.0.0 with idf 5.2.2, The problem is the same。