简体   繁体   English

构建失败 CLion、CMake、wxWidgets、Mac OS 13.1 Ventura

[英]Build failure CLion, CMake, wxWidgets, Mac OS 13.1 Ventura

While trying to learn wxWidgets and CMake, I stumbled across this link which has the supporting GitHub在尝试学习 wxWidgets 和 CMake 时,我偶然发现了这个支持GitHub链接

When trying to build this with Clion it fails with the following message:当尝试使用 Clion 构建它时失败并显示以下消息:

CMake Error at /Users/xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS)
Call Stack (most recent call first):
  /Users/xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /Users/xyz/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/223.8214.51/CLion.app/Contents/bin/cmake/mac/share/cmake-3.24/Modules/FindwxWidgets.cmake:977 (find_package_handle_standard_args)
  CMakeLists.txt:21 (find_package)

The CMakeError.log contains: CMakeError.log 包含:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ 
Build flags: 
Id flags:  

The output was:
1
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?是 wxWidgets、CLion 还是 CMake?

CMake version is 3.24.2 wxWidgets is 3.2.1 CMake 版本是3.24.2 wxWidgets是3.2.1

Thanks for all that looked at this, the issue is the version of cmake embedded in CLion version 3.24.2.感谢所有看到这个的人,问题是嵌入在 CLion 版本 3.24.2 中的 cmake 版本。

When I installed cmake with brew and point to that Version 3.25.1, CLion gives a warning showing support for 2.8.11-3.24.x however when compiling it now works.当我用 brew 安装 cmake 并指向该版本 3.25.1 时,CLion 发出警告显示支持 2.8.11-3.24.x 但是在编译时它现在可以工作了。

The tutorials at that link above are excellent.上面那个链接的教程非常好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM