Search code examples
macoswxwidgetscodelite

Using Codelite on Mac with wxWidgets but Language Server cannot wx includes


I have installed Codelite 15.0.6 and also wxWidgets-3.1.5 from source using procedure on this site. https://docs.codelite.org/build/build_wx_widgets/ When creating project using wxCrafter - wxDialog or any wx[Method] the project can not clean or build.

/usr/bin/make -j16 -e -f  Makefile clean
----------Cleaning project:[ C-Simple-Projects - Debug ]----------
make[1]: wx-config: Command not found
make[1]: wx-config: Command not found
rm -f -r ../build-Debug/C-Simple-Projects
=== build completed successfully (0 errors, 0 warnings) ===

I can understand the Compiler & Linker Options setting which calls wx-config --cxxflags is unable to be found, but calling wx-config --cxxflags from the command line works.

sudo make install

which completed successfully and can find wx-config in my shell using terminal.

    > % wx-config --cxxflags
-I/usr/local/lib/wx/include/osx_cocoa-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DwxDEBUG_LEVEL=0 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__

My problem is also that the Language Server shows file not found.


Solution

  • Changed settings for make in the project to "default" and the application started building. Issue is related to Codelite makefile generator setting. I also changed the compiler options to include fully qualified path to wx-config executable. Will try to use Save as Template - see if that will generate other projects with these setting preconfigured. Fingers crossed. actually adding -std=cxx17 to linker options did the trick. resolved!