There is a bugfix for this (qtbase, change 07c0fdf), but I went into Qt-5.4. So we need to backport this to 5.3. You should be able to work around it for now by doing a clean build of your project whenever you change main.
-Richard ________________________________ Fra: Kate Alhola [kate.alh...@gmail.com] Sendt: 16. september 2014 11:43 Til: Gustavsen Richard Kopi: Jb Hubert; interest@qt-project.org Emne: Re: [Interest] iOS Deployment: QApplication created before UIApplicationMain I start to get this same error os same application when i switched to XCode6 . With Xcode6, app runs first but then for some reason it starts making this even i did not change main at all. This s with xcode project created with qt creator and just normal qt/c++ /QML app. I did not put any fancy linker optimisations anywhere, I just got Qt5.3.2RC and XCode6 to get app running in ios8. My fix was simple #ifdef Q_OS_IOS extern "C" int qtmn(int argc, char *argv[]) #else int main(int argc, char *argv[]) #endif Kate On Mon, Sep 15, 2014 at 4:03 PM, Gustavsen Richard <richard.gustav...@digia.com<mailto:richard.gustav...@digia.com>> wrote: This could happen if you don't create your Xcode project with qmake. Do you? Or do you manually switch on certain types of optimisations from Xcode? Another reason for hitting this is if you create a native iOS app, and uses Qt as a third-party library. Also check the build log in the report navigator in Xcode (the clock symbol in left toolbar), and check that the script "Qt prelink" says: "Renaming '_main' at offset ... to '_qtmn'" -Richard ________________________________________ Fra: interest-bounces+richard.gustavsen=digia....@qt-project.org<mailto:digia....@qt-project.org> [interest-bounces+richard.gustavsen=digia....@qt-project.org<mailto:digia....@qt-project.org>] på vegne av Jb Hubert [jb.hub...@dim3.com<mailto:jb.hub...@dim3.com>] Sendt: 15. september 2014 13:43 Til: interest@qt-project.org<mailto:interest@qt-project.org> Emne: [Interest] iOS Deployment: QApplication created before UIApplicationMain Hello, I am currently trying to deploy my qtquick application on iPhoneSimulator (my project run currently well on Desktop and Android). Compilation and linking causes no problem. When I run the application from XCode, I encountered this error message: Error: You are creating QApplication before calling UIApplicationMain. If you are writing a native iOS application, and only want to use Qt for parts of the application, a good place to create QApplication is from within ‘applicationDidFinishLaunching’ inside your UIApplication delegate. Environment: Qt5.2.1 and Qt5.3.1 Xcode 5.1.1 Targeting iOS 5.0 As I have no real practice on Apple environments, does anybody have some advices concerning this issue? Thanks in advance. _______________________________________________ Interest mailing list Interest@qt-project.org<mailto:Interest@qt-project.org> http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org<mailto:Interest@qt-project.org> http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest