Import of C++ module appears within extern "C" language linkage specification

I am now trying to write unit tests for my library that depends on C++ code.

When I make an executable it works fine, however in the test target I have the following error:

/home/natinusala/Crayon/Sources/CCrayon/include/graphics.h:19:8: error: expected identifier or '('
extern "C" void gladLoadGLLoaderFromGLFW();

The library, executable and test targets all have .interoperabilityMode(.Cxx) in swiftSettings. However it looks like the test target is compiled with C interop instead...?

Am I missing something? Or are test targets not compatible with CXX interop yet?

1 Like