QT 5.2.1无法在Mac OSX 10.8.5上构建
Qt 5.2.1 fails to build on mac OSX 10.8.5
我在MacBook上下载了QT 5.2.1(.tar.gz),运行Xcode 5.0.2,Unized OS X 10.8.5,并运行此配置:
./configure -prefix $PWD/qtbase -debug-and-release -developer-build -no-c++11 -opensource -plugin-sql-sqlite -qtlibinfix _fmosoft -nomake tests -skip qtwebkit -skip qtwebkit-examples -no-compile-examples
我有几个补丁要添加到qt5.2.1,所以我不能只安装二进制文件。但是我以为我首先尝试使用我的配置选项使用未拉链的代码来构建,而无需任何补丁即可。配置成功,然后我运行
make
运行约5分钟,然后给我这个错误:
../corelib/global/qt_pch.h:58:10: error: 'qglobal.h' file not found with
<angled> include; use "quotes" instead
#include <qglobal.h>
^~~~~~~~~~~
"qglobal.h"
../corelib/global/qt_pch.h:64:10: fatal error: 'qcoreapplication.h' file not
found
#include <qcoreapplication.h>
^
2 errors generated.
make[4]: *** [.pch/debug/QtNetwork_fmosoft_debug/c++.pch] Error 1
make[3]: *** [debug-all] Error 2
make[2]: *** [sub-network-make_first] Error 2
make[1]: *** [sub-src-make_first] Error 2
make: *** [module-qtbase-make_first] Error 2
我在做什么错?如何在MacBook上构建QT5.2.1?
前缀是安装前缀,它指向构建目录中的qtbase
文件夹是没有意义的。构建目录是您必须调用配置的地方。
以下对我有用(从OS X 10.9上的实际构建中倾倒.bash_history
):
mkdir $HOME/Qt/build-5.2.1
cd $HOME/Qt/build-5.2.1
~/Qt5.2.1/5.2.1/Src/configure -prefix "$HOME/Qt/5.2.1" -debug-and-release
-no-pkg-config -opensource -confirm-license -optimized-qmake
-nomake examples
make -j2
make install
make install
之后,您将其安装到$HOME/Qt/5.2.1
。这就是前缀。
相关文章:
- 在OSX上使用CMake将Adobe的XMP工具包构建为共享库的最简单方法是什么?
- Xcode OSX上的C++构建失败,出现多个错误文件IO..不可用:在macOS 10.15中引入
- 在OSx:ld上使用CMake构建C++项目:找不到体系结构x86_64的符号
- 在 OSX 上从源代码构建 GIMP 2.10 在"gimp-debug-tool-2.0"失败
- 构建共享对象 - 使用 Ninja 编译适用于 OSX 和 Windows 上的 Ubuntu Crush
- QT 5.2.1无法在Mac OSX 10.8.5上构建
- 使用SCON在Mac OSX 10.9上构建
- QT CIMG不会在OSX 10.9上构建
- OSX 上的应用程序构建找不到配置文件
- QtCreator构建系统在OSX升级后损坏
- OSX Scons构建共享库:体系结构x86_64的未定义符号
- Mac OSX:构建opencv_contrib致命错误:找不到文件 opencv2/core.hpp
- osx - 构建 POCO 库时出现链接错误
- "Thread" Boost 无法在 OSX 上构建?
- 如何解决 OSX cctools 中的构建错误
- 使用带有python绑定的boost在osx上构建32位版本的libtorrent
- 如何在Qt/C++中构建一个自定义的本机OSX webkit小部件
- 在OSX上使用CMake构建Unity原生捆绑包
- .framework文件在osx构建配置
- OSX:构建MySQL c++连接器