I use Artix linux on OpenRC, I have installed wxwidgets with wxgtk3-dev
package (version 3.1.5) from AUR and I wanted to work with that library in CLion. CLion sees it and I'm able to include anything from wx/ dir.
I have copied a hello world example from wxwidgets website and pasted it into my cpp source file and then CLion showed me a bunch of undeclired identifier
errors (though some 'identifiers' like wxFrame
are not 'undeclared'). But I'm able to build and run project and it works fine.
What's wrong with CLion and what can I do to fix this?
I've seen some guides but most of them tell about Windows and also they tell how to compile project that is not the problem in my case - it's compiling but CLion tells me that it won't compile (and still builds and runs it).
Here's also my CMakeLists.txt
if needed: https://pastebin.com/58NwS4AP
OK I solved my problem. As you can see in my CMakeLists.txt
it uses C++14. It seems that CLion can not properly handle some code from example with C++14 although it's not a problem for cmake
and make
to build it. I just switched to C++11:
set(CMAKE_CXX_STANDARD 11)
and now everything works!