Skip to content

#include <cassert> in assert.h causes error with clangd #3181

Description

@ancientstraits

I like to use the clangd language server with my projects,
but a problem arises when using it for a C++ project that uses pico-sdk.
Even when using the correct compile-commands.json, I cannot remove this error.

The error is:

In included file: 'cassert' file not found

The only way for me to remove this message is to remove the #include <cassert> in src/common/pico_base_headers/include/pico/assert.h. If I #include <assert.h> instead, there is no error, and I still can use the assert macro.

Does pico-sdk include C++ headers anywhere else, or is it only for <cassert>?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions