Error: Could not resolve SDK path for #39;macosx10.8#39;(错误:无法解析“macosx10.8的 SDK 路径)
问题描述
所以我大约在 5 分钟前安装了 qt,当我想在 Push Button 中编写一行简单的文本并尝试运行它时,我收到了这个错误:
So I just installed qt around 5 minutes ago, and when I wanted to code a simple line of text in the Push Button and try to run it, I got this error:
:-1: 错误:无法解析 'macosx10.8' 的 SDK 路径
:-1: error: Could not resolve SDK path for 'macosx10.8'
有人可以帮忙吗?另外,如果你需要我做点什么,你能不能像我五岁那样解释一下.(实际上不像我五岁,但我希望你明白我的意思)
Could anyone help? Also, if you need me to do something, could you explain like I'm five please. (Not actually like I"m five but I hope you know what i mean)
推荐答案
问题是 Qt 的在线安装程序目前默认支持 OSX 10.8 (Mountain Lion),我猜你在 10.9 (Mavericks) 或更大.
The problem is that the online installer for Qt currently supports OSX 10.8 (Mountain Lion) by default, and I'm guessing you are on 10.9 (Mavericks) or greater.
有一个解决方法:
- 使用 finder 导航到您安装 Qt 的位置(默认/用户/您的用户名/Qt)
- 进入子目录 5.3/clang_64/mkspecs 目录
- 使用文本编辑器打开名为 qdevice.pri 的文件
- 换行
!host_build:QMAKE_MAC_SDK = macosx10.8到:!host_build:QMAKE_MAC_SDK = macosx10.9如果您使用的是 OS X 10.9 (Mavericks),或者!host_build:QMAKE_MAC_SDK = macosx如果您使用的是 OS X 10.10 (Yosemite)
- Navigate to where you installed Qt (default /Users/your username/Qt) using finder
- Go to the subdirectory 5.3/clang_64/mkspecs directory
- Open the file called qdevice.pri with a text editor
- Change the line
!host_build:QMAKE_MAC_SDK = macosx10.8to:!host_build:QMAKE_MAC_SDK = macosx10.9if you are on OS X 10.9 (Mavericks), or!host_build:QMAKE_MAC_SDK = macosxif you are on OS X 10.10 (Yosemite)
这篇关于错误:无法解析“macosx10.8"的 SDK 路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:错误:无法解析“macosx10.8"的 SDK 路径
基础教程推荐
- 为什么 RegOpenKeyEx() 在 Vista 64 位上返回错误代码 2021-01-01
- 为什么派生模板类不能访问基模板类的标识符? 2021-01-01
- 通过引用传递 C++ 迭代器有什么问题? 2022-01-01
- 为什么 typeid.name() 使用 GCC 返回奇怪的字符以及如 2022-09-16
- GDB 显示调用堆栈上函数地址的当前编译二进制文 2022-09-05
- 初始化列表*参数*评估顺序 2021-01-01
- 如果我为无符号变量分配负值会发生什么? 2022-01-01
- CString 到 char* 2021-01-01
- 我应该对 C++ 中的成员变量和函数参数使用相同的名称吗? 2021-01-01
- 非静态 const 成员,不能使用默认赋值运算符 2022-10-09
