C++ header files and crash issue

René J.V. Bertin rjvbertin at gmail.com
Sun Jul 7 18:35:46 BST 2019


Steve the Fiddle wrote on 20190707::17:53:38 re: "Re: C++ header files and crash issue"

>On Sun, 7 Jul 2019 at 17:42, René J.V. Bertin <rjvbertin at gmail.com> wrote:
>
>> Steve the Fiddle wrote on 20190707::17:10:05 re: "Re: C++ header files and
>> crash issue"
>>
>>
>> >"Project menu > Open / Import Project" does not allow me to select a file,
>> >only a directory.
>> >How do I load a project from CMakeLists.txt?
>>
>> The "Open Project" dialog should allow you to "Open 'CMakeLists.txt' as
>> project". If it doesn't, you will need to check if you have installed all
>> kdevelop-related packages, and (in Settings/Configure KDevelop.../Plugins)
>> if the CMake Project Builder has been enabled.
>>
>
>I'm using "KDevelop 5.3.2 (64bit) AppImage" from:
>https://www.kdevelop.org/download
>There isn't an option "Open Project" as far as I can see, only
>"Project menu > Open / Import project".
>The "Open Project" dialog that opens from there says "Files of type:
>Directories" (no other options).
>
>The download page does not mention additional dependencies being required.

This I don't understand; you'll have to ask on the list what's happening there.

Note however that there's an error in the project's CMake files (references to non-existing files) and seems to be hardwired for MSWin, so this exercise won't help you very much.
It also doesn't help with the "Did you mean std::Foo" class error. 

BTW, I don't think that one happens because KDevelop does not see the class definitions, because it will happily take you to the std::Foo definition (e.g. std::AboutDialog is defined in AboutDialog.h, according to KDevelop).

I'm also seeing errors about std::wxString being an imcomplete type.

To me this suggests that somehow the KDevelop parser adds a "using std" or similar that makes the std the active namespace. Go figure out where that happens ...

What also is bound NOT to help is the fact that the project uses an explicit include header that is included via a compiler argument (`-include AudacityHeaders.h`). I think that this is not well supported by KDevelop.
 
---
I add 2 explicit header search paths to the standard Makefile-based project: the wxWidgets include directory (/opt/local/libexec/wxWidgets/3.1/include/wx-3.1 for me), and the corresponding gtk2-unicode directory (/opt/local/libexec/wxWidgets/3.1/lib/wx/include/gtk2-unicode-3.1). I also add 3 custom defines: WXUSINGDLL=1, _FILE_OFFSET_BITS=64 and __WXGTK__=1 .

With that, I get no parsing errors, and I cannot reproduce your crash on PlayableTrackControls.cpp either.

R.




More information about the KDevelop mailing list