CodeLite not finding Clang on MinGW even though it's installed

CodeLite installation/troubleshooting forum
Fred_CodeLite
CodeLite Curious
Posts: 2
Joined: Tue Jun 23, 2020 4:53 am
Genuine User: Yes
IDE Question: C++
Contact:

CodeLite not finding Clang on MinGW even though it's installed

Post by Fred_CodeLite » Tue Jun 23, 2020 5:19 am

Hi,

I have MinGW running on Win10. I downloaded and installed CodeLite 14.0.0 from codelite.org. It's installed as a normal windows installation. I can compile/run/debug using gcc and gdb.

However, even though I have clang installed in MinGW, CodeLite is not finding it. I installed clang 10.0.0-2 using pacman under MinGW. When I run

Code: Select all

pacman -Ss 64-clang
, it returns this:

Code: Select all

mingw64/mingw-w64-x86_64-clang 10.0.0-2 [installed]
    C language family frontend for LLVM (mingw-w64)
mingw64/mingw-w64-x86_64-clang-analyzer 10.0.0-2 [installed]
    A source code analysis framework (mingw-w64)
mingw64/mingw-w64-x86_64-clang-tools-extra 10.0.0-2 [installed]
    Extra tools built using Clang's tooling APIs (mingw-w64)

As far as pacman and Mingw are concerned, I have the 64 bit version of the clang compiler, analyzer, and extra tools installed under mingw64. Here you can see where it is in the MinGW folders when looking in Explorer:
clang in Explorer.PNG

However, when I scan for compilers it only finds gcc. Here's what shows up after hitting the button to scan for compilers:
CodeLite - scanning for compilers.PNG


I am also unable to get code completion working, and DoxyGen comments aren't showing up either. As far as I understand, those features are intertwined with Clang and the Language Servers. I'm hoping that once I can get CodeLite to recognize the clang installation, I can see if any of the other issues get resolved.

I appreciate any help on this.

Using: CodeLite v14.0.0 downloaded from codelite.org
OS: Windows 10
You do not have the required permissions to view the files attached to this post.

User avatar
eranif
CodeLite Plugin
Posts: 6055
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite not finding Clang on MinGW even though it's installed

Post by eranif » Mon Jun 29, 2020 12:35 pm

This is because you installed it via pacman which is not Windows native.
You need to download and install the *native* installer for Windows
Make sure you have read the HOW TO POST thread

Fred_CodeLite
CodeLite Curious
Posts: 2
Joined: Tue Jun 23, 2020 4:53 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite not finding Clang on MinGW even though it's installed

Post by Fred_CodeLite » Tue Jun 30, 2020 7:35 am

eranif,

I can do that. But gcc was also installed via pacman, and CodeLite finds it no problem. Any idea why? I'm launching CodeLite from within MinGW.

User avatar
eranif
CodeLite Plugin
Posts: 6055
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: CodeLite not finding Clang on MinGW even though it's installed

Post by eranif » Tue Jun 30, 2020 11:48 am

the logic to detect compilers is not the same for all of them.
For LLVM (clang) we read the registry on Windows to locate the installation path, since you installed using pacman, i'd guess no registry entries were written.

You can point CodeLite to the bin directory where clang.exe exists and it will find it
Make sure you have read the HOW TO POST thread

Post Reply