How to configure Clang Toolchain in Eclipse on Windows?

I apologize for the stupid question. But I could not find the answer on the Internet. I am trying to configure Clang compiler / linker / ... for Eclipse on Windows 7 on a 64 bit machine. My knowledge of C ++ is very outdated and I have never worked in Eclipse. What I'm trying to achieve is to compile the simplest hello world application using Clang under Eclipse on a Windows 7 x64 computer.

I managed to complete the http://clang.llvm.org/get_started.html instruction on creating and creating LVVM + Clang. I installed the Eclipse plugin as described at http://marketplace.eclipse.org/content/llvm-toolchain-eclipse-cdt . I set the PATH environment variable to c: \ lvvm \ debug \ bin; which contains embedded executables.

Now, how do I switch Eclipse to use LVVM? In particular, what can I say:

  • include directories
  • libraries
  • serarch path

in the next dialog box?

enter image description here

I also found the following dialog in the project settings:

enter image description here

It’s not clear how I should look.

Thanks for the help! Sorry for the nooby question, I'm a C # developer trying to return to C ++.

+9
eclipse ide clang settings
Jun 10 2018-12-12T00:
source share
1 answer

For what it's worth, I just had to do it today, and I found all I needed to do was change

project -> properties -> c / C ++ build -> settings -> tool settings -> gcc C ++ compiler -> command: change it from g ++ to clang ++

and similarly

project -> properties -> c / C ++ build -> settings -> tool settings -> gcc c compiler -> command: change it from gcc to clang

As for the indexer, I found this helped ....

Eclipse CDT indexer does not know C ++ 11 containers

Although this is more C ++ 11 than the clang thing, I needed both.

+1
Oct. 22 '15 at 19:28
source share



All Articles