MAC inter芯片升级最新Tahoe 26.0造成的QT6.8.3编译连接错误(ld: framework ‘AGL‘ not found)
ld: framework 'AGL' not found
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
21:28:17: The command "/usr/local/Cellar/cmake/4.1.0/bin/cmake --build /Users/liqiang/myQT/TestPilot/build/Qt_6_8_3_for_macOS-Debug --target all" terminated with exit code 1.
21:28:17: Error while building/deploying project TestPilot (kit: Qt 6.8.3 for macOS)
21:28:17: When executing step "构建"
为了实现自己的目标,在QT 这条路上还要不断前行, 好家伙, 升个系统和QT 版本,竟然报了这个错误, 完全不知道咋回事, 就这么被卡了好几天.
鱼似好好上班, 假装工作,认真折腾、下班回家也折腾,晚上洗完澡,睡前也折腾几分钟.一共花搞了好几天, 最终还是没搞明白.
愚是我放弃折腾了,等待有识之士的出现.好家伙, 还真找到了一位朋友的博文,它给出了解决方案:参考以下连接:https://blog.csdn.net/qq_41673920/article/details/151997306(要感谢这位朋友.非常感谢!)
不得不说, 机会有时候是等来的.当然了, 咱也得有点水平, 要不人家给你方法了, 还是不会.
下面,跟上我的节奏.
第一步:把你最爱的MAC book pro顶配版电脑打开. 在QT 的安装目录下找到FindWrapOpenGL.cmake文件.
第二步:注释掉 40-46行的(带有AGL 的)(带有AGL 的)(带有AGL 的)内容:
find_library(WrapOpenGL_AGL NAMES AGL)
if(WrapOpenGL_AGL)
set(__opengl_agl_fw_path "${WrapOpenGL_AGL}")
endif()
if(NOT __opengl_agl_fw_path)
set(__opengl_agl_fw_path "-framework AGL")
endif()
49行的target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE ${__opengl_agl_fw_path})内容.保存把文件关上.
第三步:编译QT ,看到没有, 看到没有, 她来了, 她来了. 码农最喜欢的那个什么、什么思富哦.(finished successfully.)
第四步:把电脑关上.收工.(不对啊, 属性动画好像没有Qt6.3丝滑了,先不管了)晚上再折腾几分钟.懂的人都懂.
DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。
更多推荐

所有评论(0)