Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Qt Creator / QBS Can't Build for iOS (clang++ Uses Wrong Architecture)



  • A while back I converted my QMake project to use QBS. I cannot get the QBS project to compile for iOS (it works great for Windows and OSX)....

    Specifically, I get a linker error "ld: unknown/unsupported architecture name for: -arch armv4t".

    I created a very simple QBS project to build a QML application with a window, a button, and text and get the same error.

    When comparing the build output of my QMake project, I see that clang++ is given the correct architecture flag clang++ -arch armv7 during compilation whereas the QBS project incorrectly uses clang++ -arch arm which I'm assuming results in the linker error later.

    I'm not sure if this is a bug with QBS/QtCreator or if I need to hack a file somewhere to force the right arch flag? I know I could probably use QBS's cpp.cxxFlags to force this somehow but that seems kludgey.

    My questions are:

    1. Does QBS + QtCreator support building for iOS?
    2. Where do QBS's compile/link flags come from?

    I'm using Qt for iOS 5.4.2 (5.4.1 did the same thing), Qt Creator 3.4.2 (the prior version had the same issue too) and XCode 6.4, and the auto-detected kit for "iphoneos-clang Qt 5.4.1 for iOS".


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Can you post a minimal QBS project that reproduce this behavior ?


Log in to reply