Matthijs Möhlmann via Boost
On 16/11/2023 17:25, Andrey Semashev via Boost wrote:
Note that the compiler executable is clang++-16, not clang-16. The former is a C++ compiler, the latter is C. Presumably, the C compiler doesn't add C++ standard libraries to the linker. But I would also expect it to fail to compile C++ code, or at least display some warning, but maybe it doesn't.
Damn, this fixed the issue. Definitely user error then (me) :-(
This is a fairly common mistake that usually wastes a surprising amount of time (this thread of 16 emails is good illustration). On the other hand, it's not that hard for the build system to detect the mismatch. We do it in build2: $ b config.cxx=clang-16 warning: clang-16 looks like a C compiler info: should it be 'clang++' instead of 'clang'?