xcode 在 OS X 上安装 Qt 库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13233393/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing Qt libraries on OS X
提问by AXL79
I'm trying to install the Qt 4.8.3 precompiled libraries downloaded from http://qt-project.org/downloadson my OS X 10.6 machine. Unfortunately the package doesn't seem to actually install any libraries (although it claims to do so in the readme)
我正在尝试在我的 OS X 10.6 机器上安装从http://qt-project.org/downloads下载的 Qt 4.8.3 预编译库。不幸的是,该软件包似乎并未实际安装任何库(尽管它在自述文件中声称这样做)
I've read loads of instructions of how to configure and build Qt from source but these are precompiled, as in 'you don't have to compile them yourself'. So I must be missing something.
我已经阅读了大量有关如何从源代码配置和构建 Qt 的说明,但这些说明是预编译的,例如“您不必自己编译它们”。所以我一定错过了一些东西。
Is there anyone out there who knows how to actually install Qt on OS X so that it is possible to link against them -without- building the whole thing from source.
有没有人知道如何在 OS X 上实际安装 Qt,以便可以链接到它们——而无需从源代码构建整个东西。
Thanks
谢谢
回答by oggmonster
Assuming you have downloaded the compiled libraries, all you should need to do is locate them in Qt Creator preferences. Go to:
假设您已经下载了编译好的库,您需要做的就是在 Qt Creator 首选项中找到它们。去:
Preferences->Build & Run->Qt Versions
首选项->构建和运行->Qt版本
Click add, it will ask you to locate the qmake executable for your Qt library version. Mine happens to be located at:
单击添加,它会要求您找到 Qt 库版本的 qmake 可执行文件。我的恰好位于:
/Users/MyUserName/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake
/Users/MyUserName/QtSDK/Desktop/Qt/4.8.1/gcc/bin/qmake
As long as you know where you have put your downloaded libraries you should be able to locate the file. Then all you need to do is go to Projects on the Qt Creator sidebar and select your Qt version from the drop down.
只要您知道将下载的库放在哪里,您就应该能够找到该文件。然后您需要做的就是转到 Qt Creator 侧边栏上的项目并从下拉列表中选择您的 Qt 版本。
回答by Trenton Schulz
The Qt frameworks are located in /Library/Frameworks/.
Qt 框架位于 /Library/Frameworks/ 中。
When you start the Qt.mpkg in Installer. The Welcome Screen has the following text:
当您在安装程序中启动 Qt.mpkg 时。欢迎屏幕具有以下文本:
After a successful install, you can find most new things in /Developer. Specifically things will be located in the following places:
成功安装后,您可以在 /Developer 中找到大多数新内容。具体的东西将位于以下位置:
? Qt Designer, Qt Linguist: /Developer/Applications/Qt
? Qt Documentation: /Developer/Documentation/Qt
? Qt Examples: /Developer/Examples/Qt
? Qt Plugins: /Developer/Applications/Qt/Plugins
? Qt Frameworks: /Library/Frameworks
? Qt Libraries: /usr/lib
? qmake, moc, uic, etc.: /Developer/Tools/Qt (symlink to /usr/bin)
? Uninstall script: /Developer/Tools/uninstall-qt.py
These should help you out.
这些应该可以帮助你。