Description
I see 2 problems:
1) Qt creator (still) generates wrong profile - it doesn't set pass Qt.core.libInfix property for iPhone simulator (i think, it should be "iphonesimulator")
2) setting this property manually has no effect.
Generated profile:
profiles.qtc_iphonesi_447e5604.Qt.core.availableBuildVariants: ["debug", "release"] profiles.qtc_iphonesi_447e5604.Qt.core.binPath: "/Applications/Qt/5.5/ios/bin" profiles.qtc_iphonesi_447e5604.Qt.core.buildVariant: ["debug", "release"] profiles.qtc_iphonesi_447e5604.Qt.core.config: ["qt", "warn_on", "release", "link_prl", "app_bundle", "reduce_exports", "incremental", "global_init_link_order", "lib_version_first", "plugin_no_soname", "sdk", "clang_pch_style", "cross_compile", "iphonesimulator_and_iphoneos", "static", "qpa", "no_mocdepend", "debug", "qt_no_framework", "ios", "mac", "darwin", "unix", "posix", "gcc", "clang", "llvm", "c++11"] profiles.qtc_iphonesi_447e5604.Qt.core.docPath: "/Applications/Qt/Docs/Qt-5.5" profiles.qtc_iphonesi_447e5604.Qt.core.frameworkBuild: false profiles.qtc_iphonesi_447e5604.Qt.core.incPath: "/Applications/Qt/5.5/ios/include" profiles.qtc_iphonesi_447e5604.Qt.core.libInfix: "" profiles.qtc_iphonesi_447e5604.Qt.core.libPath: "/Applications/Qt/5.5/ios/lib" profiles.qtc_iphonesi_447e5604.Qt.core.mkspecPath: "/Applications/Qt/5.5/ios/mkspecs/macx-ios-clang" profiles.qtc_iphonesi_447e5604.Qt.core.pluginPath: "/Applications/Qt/5.5/ios/plugins" profiles.qtc_iphonesi_447e5604.Qt.core.qtConfig: ["minimal-config", "small-config", "medium-config", "large-config", "full-config", "build_all", "debug_and_release", "build_all", "no-pkg-config", "c++11", "accessibility", "opengl", "opengles2", "static", "qpa", "reduce_exports", "getaddrinfo", "ipv6ifname", "getifaddrs", "jpeg", "png", "gif", "freetype", "harfbuzz", "system-zlib", "iconv", "dbus", "ssl", "securetransport", "concurrent", "audio-backend", "release", "debug"] profiles.qtc_iphonesi_447e5604.Qt.core.staticBuild: true profiles.qtc_iphonesi_447e5604.Qt.core.version: "5.5.0" profiles.qtc_iphonesi_447e5604.cpp.compilerName: "clang++" profiles.qtc_iphonesi_447e5604.cpp.compilerPathByLanguage: {"c":"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang","cpp":"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++","objc":"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang","objcpp":"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"} profiles.qtc_iphonesi_447e5604.cpp.linkerName: "clang++" profiles.qtc_iphonesi_447e5604.cpp.minimumIosVersion: "5.0" profiles.qtc_iphonesi_447e5604.cpp.minimumOsxVersion: "10.7" profiles.qtc_iphonesi_447e5604.cpp.platformPath: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform" profiles.qtc_iphonesi_447e5604.cpp.toolchainInstallPath: "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin" profiles.qtc_iphonesi_447e5604.cpp.xcodeSdkName: "iphonesimulator8.4" profiles.qtc_iphonesi_447e5604.cpp.xcodeSdkVersion: "8.4" profiles.qtc_iphonesi_447e5604.preferences.qbsSearchPaths: "/Users/i.komissarov/.config/QtProject/qtcreator/qbs/profiles/qtc_iphonesi_447e5604" profiles.qtc_iphonesi_447e5604.qbs.architecture: "x86" profiles.qtc_iphonesi_447e5604.qbs.sysroot: "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk" profiles.qtc_iphonesi_447e5604.qbs.targetOS: ["ios-simulator", "ios", "darwin", "bsd", "unix"] profiles.qtc_iphonesi_447e5604.qbs.toolchain: ["clang", "llvm", "gcc"]
Simple project (shows a QLabel):
import qbs.base 1.0 Application { Depends { name: "cpp" } Depends { name: "Qt.core" } Depends { name: "Qt.widgets" } files: [ "main.cpp" ] }
Linker errors:
linking qbshello /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ /Users/i.komissarov/Programming/build-qbshello-iphonesimulator_clang_Qt_5_5_0_for_iOS-Debug/qtc_iphonesi_447e5604-debug/qbshello.qtc-iphonesi-447e5604.9f06fb9e/.obj/3a52ce780950d4d9/main.cpp.o -arch i386 -g -Wall -Wextra -L/Applications/Qt/5.5/ios/lib -L/Applications/Qt/5.5/ios/plugins/platforms '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' /Applications/Qt/5.5/ios/lib/libQt5Core_debug.a -lz -lm /Applications/Qt/5.5/ios/lib/libQt5PlatformSupport_debug.a -lz -lqtpcre_debug -lm /Applications/Qt/5.5/ios/lib/libQt5Gui_debug.a -lz -lm /Applications/Qt/5.5/ios/lib/libQt5PlatformSupport_debug.a /Applications/Qt/5.5/ios/lib/libQt5Core_debug.a -lz -lqtpcre_debug -lm -lqtharfbuzzng_debug -lz /Applications/Qt/5.5/ios/lib/libQt5Widgets_debug.a -lz -lm /Applications/Qt/5.5/ios/lib/libQt5PlatformSupport_debug.a /Applications/Qt/5.5/ios/lib/libQt5Gui_debug.a -lqtharfbuzzng_debug /Applications/Qt/5.5/ios/lib/libQt5Core_debug.a -lz -lqtpcre_debug -lm -framework Foundation -framework UIKit -framework CoreFoundation -framework Foundation -framework CoreFoundation -framework Foundation -framework UIKit -framework CoreFoundation -framework CoreText -framework CoreGraphics -framework OpenGLES -framework UIKit -framework QuartzCore -framework CoreText -framework CoreGraphics -framework Foundation -framework CoreFoundation -framework Foundation -framework UIKit -framework CoreFoundation -framework CoreText -framework CoreGraphics -framework OpenGLES -framework OpenGLES -Wl,-undefined,error -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk -mios-simulator-version-min=5.0 -force_load /Applications/Qt/5.5/ios/plugins/platforms/libqios_debug.a -force_load /Applications/Qt/5.5/ios/plugins/platforms/libqios_debug.a -force_load /Applications/Qt/5.5/ios/plugins/platforms/libqios_debug.a -o /Users/i.komissarov/Programming/build-qbshello-iphonesimulator_clang_Qt_5_5_0_for_iOS-Debug/qtc_iphonesi_447e5604-debug/qbshello.qtc-iphonesi-447e5604.9f06fb9e/qbshello.app/qbshello ld: warning: directory not found for option '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' ld: warning: directory not found for option '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' ld: warning: directory not found for option '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' ld: warning: directory not found for option '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' ld: warning: directory not found for option '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' ld: warning: directory not found for option '-L/Users/i.komissarov/Programming/qbshello/$$[QT_INSTALL_LIBS]' ld: warning: ld: warning: ignoring file /Applications/Qt/5.5/ios/plugins/platforms/libqios_debug.a, missing required architecture i386 in file /Applications/Qt/5.5/ios/plugins/platforms/libqios_debug.a (2 slices)ignoring file /Applications/Qt/5.5/ios/lib/libQt5Core_debug.a, missing required architecture i386 in file /Applications/Qt/5.5/ios/lib/libQt5Core_debug.a (2 slices) ld: warning: ignoring file /Applications/Qt/5.5/ios/lib/libQt5PlatformSupport_debug.a, missing required architecture i386 in file /Applications/Qt/5.5/ios/lib/libQt5PlatformSupport_debug.a (2 slices) ld: warning: ignoring file /Applications/Qt/5.5/ios/lib/libqtpcre_debug.a, missing required architecture i386 in file /Applications/Qt/5.5/ios/lib/libqtpcre_debug.a (2 slices) ld: warning: ignoring file /Applications/Qt/5.5/ios/lib/libQt5Gui_debug.a, missing required architecture i386 in file /Applications/Qt/5.5/ios/lib/libQt5Gui_debug.a (2 slices) ld: warning: ignoring file /Applications/Qt/5.5/ios/lib/libqtharfbuzzng_debug.a, missing required architecture i386 in file /Applications/Qt/5.5/ios/lib/libqtharfbuzzng_debug.a (2 slices) ld: warning: ignoring file /Applications/Qt/5.5/ios/lib/libQt5Widgets_debug.a, missing required architecture i386 in file /Applications/Qt/5.5/ios/lib/libQt5Widgets_debug.a (2 slices) Undefined symbols for architecture i386: "QArrayData::deallocate(QArrayData*, unsigned long, unsigned long)", referenced from: QTypedArrayData<unsigned short>::deallocate(QArrayData*) in main.cpp.o "QApplication::exec()", referenced from: qtmn(int, char**) in main.cpp.o "QApplication::QApplication(int&, char**, int)", referenced from: qtmn(int, char**) in main.cpp.o "QApplication::~QApplication()", referenced from: qtmn(int, char**) in main.cpp.o "QLabel::QLabel(QString const&, QWidget*, QFlags<Qt::WindowType>)", referenced from: qtmn(int, char**) in main.cpp.o "QLabel::~QLabel()", referenced from: qtmn(int, char**) in main.cpp.o "QString::fromAscii_helper(char const*, int)", referenced from: QString::QString(char const*) in main.cpp.o "QWidget::show()", referenced from: qtmn(int, char**) in main.cpp.o "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) Process failed with exit code 1. The following products could not be built for configuration qtc_iphonesi_447e5604-debug: qbshello
Please, fix iOS support
Attachments
For Gerrit Dashboard: QBS-838 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
260675,4 | Fix building iOS-simulator apps when qbs.architecture is undefined | 1.13 | qbs/qbs | Status: MERGED | +2 | 0 |