This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Adding custom paths for parser

Tags: None
(comma "," separated)
stf
Registered Member
Posts
8
Karma
0

Adding custom paths for parser

Mon Apr 23, 2018 9:28 pm
KDevelop 5.2.1
WxWidgets 3.0.2
C++
Autotools
Project: Audacity 2.3.0 alpha (https://github.com/audacity/audacity)

I was previously working with KDevelop 4.4.7 and the parser was correctly finding the wx headers, but with KDevelop 5.2.1 none of the wx header files are found, so appear underlined with hover message: "Problem in Semantic Analysis. Solution (1) Add custom include path.

The custom include paths that I set up for KDevelop 4.4.7 are listed in:
Project > Open Configuration > Language Support > Includes / Imports

I notice that there is now an option here for "project root" or "src", and a separate tab for "defines".
I can find no documentation for setting this up correctly and I still can't get KDevelop 5.2.1 to parse the Audacity code correctly.

Is there any documentation?
Where's the best place to get help?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Adding custom paths for parser

Sun Apr 29, 2018 7:11 am
The place to add custom include directories is still there, go to project configuration, language support, Includes/Imports tab.

Best,
Sven


I'm working on the KDevelop IDE.
stf
Registered Member
Posts
8
Karma
0

Re: Adding custom paths for parser

Sun Apr 29, 2018 9:36 am
scummos wrote:The place to add custom include directories is still there, go to project configuration, language support, Includes/Imports tab.

Thanks for the response Sven.

The problem that I'm having is:

1) Include paths that I added (and worked) in Kdevelop 4.4.7 do not work after upgrading to Kdevelop 5.2.1

2) Whereas Kdevelop 4.4.7 had one place to define includes, Kdevelop 5.2.1 has three different places, but I can't find any documentation about which to use for what.

3) Despite many hours of trying and Googling, Kdevelop 5.2.1 fails to parse WxWidgets code. I can't find any relevant documentation and I see no indication for why it doesn't work, it just doesn't parse the Wx code.

Please note that Audacity does build correctly in Kdevelop 5.2.1, so GCC is clearly having no problem finding the includes, it's just that Kdevelop's parser cannot.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: Adding custom paths for parser

Sat May 05, 2018 3:54 pm
Hmm, sorry for your trouble. But which three different places? Did you look in the location I mentioned in my last post? That is the only one I know of.


I'm working on the KDevelop IDE.
stf
Registered Member
Posts
8
Karma
0

Re: Adding custom paths for parser

Wed May 09, 2018 12:52 pm
scummos wrote:Hmm, sorry for your trouble. But which three different places? Did you look in the location I mentioned in my last post? That is the only one I know of.

My previous post was not quite correct. I see that in kdevelop 4.7.3 there are also three places (but I've only ever had to use one).

This works in kdevelop 4.7.3:

Project > Open Configuration > Custom Defines and Includes >

[(project root)] [Includes / Imports]
/usr/include/wx-3.0/wx/
/usr/include/wx-3.0/wx/gtk/
/home/<username>/Sourcecode/audacity/include/audacity/
/home/<username>/Sourcecode/audacity/src/widgets/
/usr/include/gtk-2.0/gtk/gtk.h

[(project root)] [Defines]
None

[src] [Includes / Imports]
None

[src] [Defines]
None

In kdevelop 5.2.1, I have the same settings in:

Project > Open Configuration > Language Support >

[(project root)] [Includes / Imports]
/usr/include/wx-3.0/wx/
/usr/include/wx-3.0/wx/gtk/
/home/<username>/Sourcecode/audacity/include/audacity/
/home/<username>/Sourcecode/audacity/src/widgets/
/usr/include/gtk-2.0/gtk/gtk.h

There is also an additional tab "C/C++ Parser" which I have not changed.

In kdevelop 5.2.1, none of the wx includes are found by kdevelop, though the project still builds correctly.
stf
Registered Member
Posts
8
Karma
0
I've made progress ;D
KDevelop-5.2.1-x86_64.AppImage would start parsing, but before completion it would crash, so I've switched to KDevelop-5.1.2-x86_64.AppImage.

In 5.1.2 I've modified the include paths so that they go one level up from what worked in 4.7.3.
The paths now are:

"Project > Open Configuration > Custom Defines and Includes >"
[(project root)] [Includes / Imports]
/usr/include/wx-3.0
/home/<user-name>/Sourcecode/audacity/lib-src
/home/<user-name>/Sourcecode/audacity/include

Even though I'm working on quite a fast i7 with SSD, parsing took a long time, about 30 minutes. RAM use was very high during this time, approaching 3 GB, and CPU also high at about 25% (equivalent to thrashing two of the available 8 cores). Eventually, when it completed, CPU and RAM came back down to reasonable levels. I've not yet had time to use it much, but all seems well now.
stf
Registered Member
Posts
8
Karma
0

Re: Adding custom paths for parser

Sat Jan 23, 2021 9:28 pm
I'm now trying kdevelop 5.6.1 and I'm back to square one. Code analysis is non-existent. It can't even find function declarations when both the .cpp and .h files are open.

This could be a fantastic IDE if only there was adequate documentation.
User avatar
Mamarok
Manager
Posts
6071
Karma
16
OS

Re: Adding custom paths for parser

Thu Jan 28, 2021 3:02 pm
stf wrote:I'm now trying kdevelop 5.6.1 and I'm back to square one. Code analysis is non-existent. It can't even find function declarations when both the .cpp and .h files are open.

This could be a fantastic IDE if only there was adequate documentation.


Have a look at https://userbase.kde.org/KDevelop5/Manual

Also please keep in mind that in Free Software, documentation is a community effort, you are welcome to contribute any time :-)


Running Kubuntu 22.10 with Plasma 5.26.3, Frameworks 5.100.0, Qt 5.15.6, kernel 5.19.0-23 on Ryzen 5 4600H, AMD Renoir, X11
FWIW: it's always useful to state the exact Plasma version (+ distribution) when asking questions, makes it easier to help ...
stf
Registered Member
Posts
8
Karma
0

Re: Adding custom paths for parser

Thu Jan 28, 2021 3:49 pm
Mamarok wrote:Have a look at https://userbase.kde.org/KDevelop5/Manual

Thanks for the link Mamarok. Good to see that there is an active documentation effort. Unfortunately I'm not able to find sufficient information about "Project > Configure" to get kdevelop to parse a wxWidgets project, so I'll have to stick with Visual Studio Code for now.

Mamarok wrote:Also please keep in mind that in Free Software, documentation is a community effort, you are welcome to contribute any time :-)

Absolutely. If I ever get this to work I'll be happy to contribute to the documentation.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]