1.说明
编译平台:Mac OS 10.11.6
Qt Version:5.8.0
Xcode Version:8.2.1
编译前需要安装Xcode comman line
Python、Ruby、Perl已经系统预装
2.Qt其他版本说明
开始使用Qt5.6.2进行编译,在两个文件中出现bug,分别为:src/bluetooth/osx/osxbtcentralmanager.mm;src/bluetooth/osx/osxbtledeviceinquiry.mm。
QtCreator需要使用4.2.1否则无法开启模拟器,使用Qt5.6.2编译完成之后会出现闪退现象,报错原因:[QIOSViewController setPrefersStatusBarHidden:]: unrecognized selector sent to instance 0x7f89cb001dc0,google了一下报错原因,没有找到对应的解决方法,最后还是使用Qt5.8.0尝试编译。
3.Configure指令
configure -prefix /Users/spoon/Dev/Qt/QtiOS -hostprefix /Users/spoon/Dev/Qt/QtiOS -xplatform macx-ios-clang -release -opensource -accessibility -nomake examples
Configure summary:
Building on: x86_64
Building for: arm
Configuration: cross_compile compile_examples largefile neon precompile_header accessibility release simulator_and_device build_all c++11 c++14 c++1z concurrent no-pkg-config reduce_exports static stl
Build options:
Mode ................................... release
Building shared libraries .............. no
Using C++ standard ..................... C++1z
Using gold linker ...................... no
Using precompiled headers .............. yes
Using LTCG ............................. no
Target compiler supports:
NEON ................................. yes
Build parts ............................ libs
Qt modules and options:
Qt Concurrent .......................... yes
Qt D-Bus ............................... no
Qt D-Bus directly linked to libdbus .... no
Qt Gui ................................. yes
Qt Widgets ............................. yes
Support enabled for:
Accessibility .......................... yes
Using pkg-config ....................... no
QML debugging .......................... yes
udev ................................... no
Using system zlib ...................... yes
Qt Core:
DoubleConversion ....................... yes
Using system DoubleConversion ........ no
GLib ................................... no
iconv .................................. no
ICU .................................... no
Logging backends:
journald ............................. no
syslog ............................... no
Using system PCRE ...................... no
Qt Network:
CoreWLan ............................... no
getaddrinfo() .......................... yes
getifaddrs() ........................... yes
IPv6 ifname ............................ yes
libproxy ............................... no
SecureTransport ........................ yes
OpenSSL ................................ no
Qt directly linked to OpenSSL ........ no
SCTP ................................... no
Use system proxies ..................... yes
Qt Sql:
DB2 (IBM) .............................. no
InterBase .............................. no
MySql .................................. no
OCI (Oracle) ........................... no
ODBC ................................... no
PostgreSQL ............................. no
SQLite2 ................................ no
SQLite ................................. yes
Using system provided SQLite ......... no
TDS (Sybase) ........................... no
Qt Gui:
FreeType ............................... yes
Using system FreeType ................ no
HarfBuzz ............................... yes
Using system HarfBuzz ................ no
Fontconfig ............................. no
Image formats:
GIF .................................. yes
ICO .................................. yes
JPEG ................................. yes
Using system libjpeg ............... no
PNG .................................. yes
Using system libpng ................ no
OpenGL:
EGL .................................. no
Desktop OpenGL ....................... no
OpenGL ES 2.0 ........................ yes
OpenGL ES 3.0 ........................ yes
OpenGL ES 3.1 ........................ no
Session Management ..................... yes
Features used by QPA backends:
evdev .................................. no
libinput ............................... no
mtdev .................................. no
tslib .................................. no
xkbcommon-evdev ........................ no
QPA backends:
DirectFB ............................... no
EGLFS .................................. no
LinuxFB ................................ no
Mir client ............................. no
Qt Widgets:
GTK+ ................................... no
Styles ................................. Fusion Windows
Qt PrintSupport:
CUPS ................................... no
QtXmlPatterns:
XML schema support ..................... yes
Qt QML:
QML interpreter ........................ yes
QML network support .................... yes
Qt Quick:
Direct3D 12 ............................ no
AnimatedImage item ..................... yes
Canvas item ............................ yes
Support for Quick Designer ............. yes
Flipable item .......................... yes
GridView item .......................... yes
ListView item .......................... yes
Path support ........................... yes
PathView item .......................... yes
Positioner items ....................... yes
ShaderEffect item ...................... yes
Sprite item ............................ yes
Qt Gamepad:
SDL2 ................................... no
Qt 3D:
System Assimp .......................... no
Qt Wayland Client ........................ no
Qt Wayland Compositor .................... no
Qt Bluetooth:
BlueZ .................................. no
BlueZ Low Energy ....................... no
Linux Crypto API ....................... no
Qt Multimedia:
ALSA ................................... no
GStreamer 1.0 .......................... no
GStreamer 0.10 ......................... no
Video for Linux ........................ no
OpenAL ................................. yes
PulseAudio ............................. no
Resource Policy (libresourceqt5) ....... no
AVFoundation ........................... yes
DirectShow ............................. no
Windows Media Foundation ............... no
Qt Location:
Gypsy GPS Daemon ....................... no
WinRT Geolocation API .................. no
Qt Sensors:
sensorfw ............................... no
Qt WebEngine:
Proprietary Codecs ..................... no
Spellchecker ........................... yes
ALSA ................................... no
PulseAudio ............................. no
Note: Using static linking will disable the use of dynamically
loaded plugins. Make sure to import all needed static plugins,
or compile needed modules into the library.
Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
3.编译源码
make -j2
make install
4.编译说明
没有使用 debug and release是因为占用磁盘空间太大,release编译下来1G左右。