Clang auto cpmpletion

CodeLite installation/troubleshooting forum
shadoww
CodeLite Enthusiast
Posts: 23
Joined: Fri Mar 23, 2018 7:12 am
Genuine User: Yes
IDE Question: C++
Contact:

Clang auto cpmpletion

Post by shadoww »

A few questions about clang auto completion and codelite 13.0

Where did the output window go for the clang auto completion? I used this window to keep errors down so that the server would work correctly.

How do I change the include path for clang autocomplete? It appears that there is a file to gets written out that includes the paths but when ever I try to update it it gets rewritten out. The only way around this is to create a cmake project it seems. Things were much easier when you had a simple tab for clang on on the auto completion page in the settings.

Been playing around with SDL and clang like to complain about the SDL headers because the include path forces a path
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Clang auto cpmpletion

Post by eranif »

To answer this, I need some more info, like:

- Which OS are you using?
- Which type of workspace are you using? (File System Workspace, C++ workspace)
- What is the build method you are using?

If you are using Windows / Ubuntu or macOS, I can suggest you
to upgrade to one of the more recent builds, like: 13.0.8

When working with the default C++ workspace, CodeLite generates either compile_flags.txt or compile_commands.json file.
I think that in 13.0.8 the default is to use compile_flags.txt. The paths and everything are coming from the project settings. So basically, CodeLite will generate this file after each successful build and if project can compile, it should produce a workable file for clangd

When working with File System Workspace, You have dedicated page for this and small checkbox that suggests generating compile_flags.txt file. See screenshot. However, when working with File System workspace, you are responsible for the build process (you can configure CodeLite to launch commands for you, but it wont generate makefiles for you)
Capture.PNG
You do not have the required permissions to view the files attached to this post.
Make sure you have read the HOW TO POST thread
shadoww
CodeLite Enthusiast
Posts: 23
Joined: Fri Mar 23, 2018 7:12 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Clang auto cpmpletion

Post by shadoww »

Actually arch linux with code lite 13.0 (thinking about going back to mint as it work better there but I really want to stop distro hopping.)
c++ workspace
Codlite managed ("Default")

I can upgrade to 13.0.8 easily and yes it was the json file not the txt file.

When I get home today I will try 13.0.8.

-Thanks for codelite, keep up the good work!
shadoww
CodeLite Enthusiast
Posts: 23
Joined: Fri Mar 23, 2018 7:12 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Clang auto cpmpletion

Post by shadoww »

Is there a way to donate to the project anymore?
shadoww
CodeLite Enthusiast
Posts: 23
Joined: Fri Mar 23, 2018 7:12 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Clang auto cpmpletion

Post by shadoww »

Its still forcing the following:

-I/usr/include/c++/9.2.0
-I/usr/include/c++/9.2.0/x86_64-pc-linux-gnu
-I/usr/include/c++/9.2.0/backward
-I/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include
-I/usr/local/include
-I/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include-fixed
-I/usr/include

I don't want the x86_64-pc-linux-gnu paths in the include path. When I specify what I want in the solution it still forces everything.
Time to learn CMAKE.
Post Reply