cmake, wxWidgets , CLion, Mac OS X M1 Ventura 13.1


While trying to learn wxWidgets and CMake, I stumbled across this link which has the supporting GitHub

When trying to build this with Clion it fails with the following message:

CMake Error at /Users/xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/ (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
Call Stack (most recent call first):
  /Users/xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/ (_FPHSA_FAILURE_MESSAGE)
  /Users/xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/ (find_package_handle_standard_args)
  CMakeLists.txt:21 (find_package)

The CMakeError.log contains:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /Applications/ 
Build flags: 
Id flags:  

The output was:
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Some help required resolving this error? Is it wxWidgets, CLion or CMake?

CMake version is 3.24.2 wxWidgets is 3.2.1


Because cmake is installed with CLion I also cannot test this from the command line with:

cmake -S. -Bbuild && cmake --build build


if I do:

where cmake nothing is returned.

how can this be achieved?

Are you able to try the project your end on a Mac to see what I am referring to here?

Comment actions Permalink

incidentally if I install cmake with brew and run this from within terminal inside CLion, the command below succeeds without error.


cmake -S. -Bbuild && cmake --build build

Comment actions Permalink

Solved the issue now, it seems the version of cmake with latest CLion is 3.24.2 and if I install 3.25.1 and point to that it works, even though CLion does not support it.


Please sign in to leave a comment.