score:-2

its highly likely this is fixed in latest version of eclipse. at date this question was asked, you were using 'mars'. this version of eclipse is superseded by 'neon' and then 'oxygen' which is current as of end of january 2018. i've seen a reference to this issue being solved with 'neon' edition as it was a bug in 'mars'. i cannot personally confirm this though.

in addition if you manually installed clang/llvm instead of included apple version try using homebrew instead. there are some clear instructions here on using it under osx/macos in relation to clang/llvm.

score:1

in xcode app menu > toolchains > set the one you want to use.

and set the environment variable export toolchains=org.llvm.12.0.1. see the following steps to find the correct value of the env var.

if you just downloaded the compiler, headers etc., and no xctoolchain, then do this:

  • copy /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain to ~/library/developer/toolchains/

  • delete the contents of ~/library/developer/toolchains/xcodedefault.xctoolchain/usr.

  • either copy the share, libexec, lib, include, bin folders from the llvm binaries to these locations inside ~/library/developer/toolchains/xcodedefault.xctoolchain/usr. or you can create symlinks.

  • edit the ~/library/developer/toolchains/xcodedefault.xctoolchain/toolchaininfo.plist to change the identifier to whatever you want.

simply downloading the binaries doesn't make it a "toolchain" that xcode expects like in /applications/xcode.app/contents/developer/toolchains/xcodedefault.xctoolchain


Related Query

More Query from same tag