Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Espressif IDE 3.0.0 with idf 5.3 c++ Project include <new> error in windows (IEP-1306) #1030

Open
LonlyPan opened this issue Aug 14, 2024 · 1 comment

Comments

@LonlyPan
Copy link

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:

  1. in windows use Espressif IDE , creat a new project use template “sample_project”
  2. Rename the main.c to main.cpp
  3. 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);
    }
}
  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
)
  1. The purpose of steps 2、3 and 4 is to support C++ for project
  2. then buid。 it will have Error message: “new file not found”,like this
    图像-20240814-204913

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

@github-actions github-actions bot changed the title Espressif IDE 3.0.0 with idf 5.3 c++ Project include <new> error in windows Espressif IDE 3.0.0 with idf 5.3 c++ Project include <new> error in windows (IEP-1306) Aug 14, 2024
@LonlyPan
Copy link
Author

I alse test Espressif IDE 3.0.0 with idf 5.2.2, The problem is the same。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant