繁体   English   中英

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

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

在尝试学习 wxWidgets 和 CMake 时,我偶然发现了这个支持GitHub链接

当尝试使用 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)

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)

一些帮助需要解决这个错误? 是 wxWidgets、CLion 还是 CMake?

CMake 版本是3.24.2 wxWidgets是3.2.1

感谢所有看到这个的人,问题是嵌入在 CLion 版本 3.24.2 中的 cmake 版本。

当我用 brew 安装 cmake 并指向该版本 3.25.1 时,CLion 发出警告显示支持 2.8.11-3.24.x 但是在编译时它现在可以工作了。

上面那个链接的教程非常好。

暂无
暂无

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

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