Skip to content

Cannot compile C++ with clang++ when swiftly is installed #312

Closed
@sbehnke

Description

@sbehnke

I get the following error compiling a C++ test file with swiftly installed:

❯ clang++ -std=c++20 test.cpp
test.cpp:1:10: fatal error: 'string' file not found
    1 | #include <string>
      |          ^~~~~~~~
1 error generated.

test.cpp

#include <string>

int main() {

}

The C++ standard library header files should be available even with swiftly installed.

This version of clang++ cannot find the C++ standard library.

❯ which clang++
/Users/sbehnke/.swiftly/bin/clang++

This works as expected.

❯ /usr/bin/clang++ -std=c++20 test.cpp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions