Skip to content

编译代码发现问题 main/remote/emotion_remote.cc:38:20: error: 'find_if' is not a member of 'std'; #12

@peiguangfeng

Description

@peiguangfeng

F:/xiaozhi/DOIT_AI-remote_ctrl/main/remote/emotion_remote.cc: In member function 'void EmotionRemote::SetEmotion(const char*)':
F:/xiaozhi/DOIT_AI-remote_ctrl/main/remote/emotion_remote.cc:38:20: error: 'find_if' is not a member of 'std'; did you mean 'std::ranges::find_if'?
38 | auto it = std::find_if(emotions.begin(), emotions.end(),
| ^~~~~~~
In file included from F:/Espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/riscv32-esp-elf/include/c++/14.2.0/tuple:44,
from F:/Espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/riscv32-esp-elf/include/c++/14.2.0/functional:53,
from F:/xiaozhi/DOIT_AI-remote_ctrl/main/remote/emotion_remote.h:5,
from F:/xiaozhi/DOIT_AI-remote_ctrl/main/remote/emotion_remote.cc:1:
F:/Espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/riscv32-esp-elf/include/c++/14.2.0/bits/ranges_util.h:543:33: note: 'std::ranges::find_if' declared here
543 | inline constexpr __find_if_fn find_if{};
| ^~~~~~~
[2026/2050] Building CXX object esp-idf/main/CMakeFiles/__idf_main.dir/boards/common/wifi_board.cc.obj
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the F:\xiaozhi\DOIT_AI-remote_ctrl\build\log\idf_py_stderr_output_12324 and F:\xiaozhi\DOIT_AI-remote_ctrl\build\log\idf_py_stdout_output_12324

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions