簡體   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