Problems building for iOS with Qt5 - missing qtcocoamain

  • I have checked out the Qt5 source (git:// and built it using the following configure options:

    @/configure -xplatform unsupported/macx-ios-clang -developer-build -nomake examples -nomake tests -release@

    I have successfully (with warnings) used qtbase/bin/qmake on my .pro file and when I open the resulting xcode project, I get a linker error:

    @ld: linker not found for -lqtcocoamain@

    I have tried to look for the source for the qtcocoamain project, but can't find it anywhere. Has anyone else seen this problem or have an idea how to build that library?


  • Not quite sure why you're getting this error, but the cause is that the build system is trying to link the 'cocoa' (Mac OSX) platform plugin, which can't and won't work on iOS. More recent versions of Qt require that the iOS SDK is specified on the command-line, so you may have more success adding '-sdk iphoneos' to your configure command-line.

  • Thank you for your reply.

    I will try to recompile.

    How do I determine that xcode is using the proper Qt? (ie. the one I just built, and not the one installed with 5.1.1 for Mac OSX)

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.