| For this library: | Use: |
|---|---|
| LLVM C++ library | -Y_cxx |
| GNU C++ library | -Y_gpp |
There aren't any no-exceptions variants of the LLVM and GNU C++ libraries; add -fno-exceptions to CXXFLAGS.
#include <cstdio>
int main(void)
{
printf("example\n");
return 0;
}
However when you use the LLVM C++ library or the GNU C++ library, or with traditional C header names (e.g., stdio.h, string.h), functions end up in both the std and global namespace, so code like the above compiles without issue.