trying to learn Clang from a book, it gives a clang++ command line
it is linux only ? I work on win 10 with 15.0.6 binaries, the only clang exe has no ++ in its name
also, clang.exe -Xclang -ast-dump -fsyntax-only test.cpp used to work, now it complains about the options I use
thanks for your help
PS *****\clang_llvm_training> .\binaries\clangd_15.0.6\bin\clangd.exe -### -std=c++11 -Wall .\simple.cpp -o simple.exe
clangd.exe: Unknown command line argument '-###'. Try: '*****\clang_llvm_training\binaries\clangd_15.0.6\bin\clangd.exe --help'
clangd.exe: Did you mean '--log'?
clangd.exe: Unknown command line argument '-std=c++11'. Try: '*****\clang_llvm_training\binaries\clangd_15.0.6\bin\clangd.exe --help'
clangd.exe: Did you mean '--log=c++11'?
clangd.exe: Unknown command line argument '-Wall'. Try: '*****\clang_llvm_training\binaries\clangd_15.0.6\bin\clangd.exe --help'
clangd.exe: Did you mean '--help'?
clangd.exe: Unknown command line argument '.\simple.cpp'. Try: '*****\clang_llvm_training\binaries\clangd_15.0.6\bin\clangd.exe --help'
clangd.exe: Unknown command line argument '-o'. Try: '*****\clang_llvm_training\binaries\clangd_15.0.6\bin\clangd.exe --help'
clangd.exe: Did you mean '-h'?
clangd.exe: Unknown command line argument 'simple.exe'. Try: '*****\clang_llvm_training\binaries\clangd_15.0.6\bin\clangd.exe --help'
I don’t know about the clang++ bit, but you are running ClangD (https://clangd.llvm.org/) there not clang. Perhaps like me, you have been caught out by Windows tab completion yet again
Looking at my Linux builds, clang++ and clang are symlinks to the clang-17 binary.
$ file ./bin/clang++
./bin/clang++: symbolic link to clang-17
I know Windows does not /does not out of the box support symlinks. So that may be why the build only has a clang.exe, perhaps we didn’t want to make another copy just to rename it?
If you’re following a book you may want to match the release with the version the book used. In that case, have a look at the previous release pages https://releases.llvm.org/.
The windows installer comes with a lot of executables. clang.exe clang++.exe clang-cl.exe … are all part of it. I think only some experimental programs are not part of it. Though most of them are even included, it even has perl and python scripts bundled.