我一直在尝试将Qt构建为iOS的共享库。有没有人能够从源代码成功构建它?如果是这样,你使用了什么版本的XCode,Qt和配置选项?
我已尝试过这四种组合:
我在使用这些选项构建之前配置Qt:
./configure -shared -xplatform macx-ios-clang -debug-and-release -sdk iphoneos9.3 -opensource -confirm-license -c++11 -no-compile-examples -nomake tools -nomake examples -nomake tests -skip qt3d -skip qtandroidextras -skip qtcanvas3d -skip qtcharts -skip qtconnectivity -skip qtdatavis3d -skip qtdoc -skip qtgraphicaleffects -skip qtimageformats -skip qtmultimedia -skip qtnetworkauth -skip qtpurchasing -skip qtscript -skip qtscxml -skip qtsensors -skip qtserialbus -skip qtserialport -skip qtspeech -skip qttools -skip qttranslations -skip qtvirtualkeyboard -skip qtwayland -skip qtwebchannel -skip qtwebengine -skip qtwebsockets -skip qtwebview -skip qtwinextras -skip qtx11extras -skip qtxmlpatterns
这是Qt打印回来的:
Configure summary
Building on: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3)
Building for: macx-ios-clang (arm64, CPU features: neon)
Build options:
Configuration .......... accessibility audio-backend build_all c++11 concurrent cross_compile dbus debug debug_and_release freetype full-config getaddrinfo getifaddrs harfbuzz iconv ipv6ifname large-config largefile medium-config minimal-config neon no-libdl no-pkg-config opengl opengles2 pcre png qpa qpa qt_framework reduce_exports release securetransport shared small-config ssl system-zlib
Build parts ............ libs
Mode ................... debug and release; default link: debug
Using sanitizer(s)...... none
Using C++ standard ..... c++11
Using gold linker....... no
Using new DTAGS ........ no
Using PCH .............. no
Using LTCG ............. no
Target compiler supports:
Qt modules and options:
Qt D-Bus ............... yes (loading dbus-1 at runtime)
Qt Concurrent .......... yes
Qt GUI ................. yes
Qt Widgets ............. yes
Large File ............. yes
QML debugging .......... yes
Use system proxies ..... no
Support enabled for:
Accessibility .......... yes
ALSA ................... no
CUPS ................... no
Evdev .................. no
FontConfig ............. no
FreeType ............... yes (bundled copy)
Glib ................... no
GStreamer .............. no
GTK theme .............. no
HarfBuzz ............... yes (bundled copy)
Iconv .................. yes
ICU .................... no
Image formats:
GIF .................. yes (plugin, using bundled copy)
JPEG ................. yes (plugin, using bundled copy)
PNG .................. yes (in QtGui, using bundled copy)
libinput................ no
Logging backends:
journald ............... no
syslog ............... no
mtdev .................. no
Networking:
CoreWlan ............. no
getaddrinfo .......... yes
getifaddrs ........... yes
IPv6 ifname .......... yes
libproxy.............. no
OpenSSL .............. no
SecureTransport ...... yes
OpenGL / OpenVG:
EGL .................. no
OpenGL ............... yes (OpenGL ES 2.0+)
OpenVG ............... no
PCRE ................... yes (bundled copy)
pkg-config ............. no
PulseAudio ............. no
QPA backends:
DirectFB ............. no
EGLFS ................ no
EGLFS i.MX6 ........ no
EGLFS i.MX6 Wayland. no
EGLFS EGLDevice .... no
EGLFS GBM .......... no
EGLFS Mali ......... no
EGLFS Raspberry Pi . no
EGLFS X11 .......... no
LinuxFB .............. no
Mir client............ no
XCB .................. no
Session management ..... yes
SQL drivers:
DB2 .................. no
InterBase ............ no
MySQL ................ no
OCI .................. no
ODBC ................. no
PostgreSQL ........... no
SQLite 2 ............. no
SQLite ............... yes (plugin, using bundled copy)
TDS .................. no
tslib .................. no
udev ................... no
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (system library)
/Users/patrickhisnibrataas/qt5/qt.pro:97: Cannot find feature qt_configure
Qt is now configured for building. Just run 'make'.
Once everything is built, you must run 'make install'.
Qt will be installed into /usr/local/QtBuild
Prior to reconfiguration, make sure you remove any leftovers from
the previous build.
但所有构建总是失败。我假设应该有一些XCode和配置选项的组合,它们应该适用于特定的Qt版本吗?