[SOLVED] Switched to "iOS Simulator" Kit -> Linker Errors on QtWidgets & QtCore/qglobal.h



  • OS X 10.8
    Creator 2.7.1
    Qt 5.1 Beta

    I'm building qt-ios-demo: https://github.com/msorvig/qt-ios-demo It builds fine as an OS X app, and I had managed to run it in the simulator before I made some problems for myself by moving Qt. But now switching to my iOS Simulator kit causes linker errors. (They only become "errors" in XCode, but Creator detects them and shows them as squiggly lines.) The OS X and iOS Simulator kits differ in name (obviously) and:

    • Qt version. I have a Qt source folder pulled from Gitorious and I cloned it into build folders which I then compiled.
    • Sysroot. This points at the respective Qt installation; I'm not sure why I need to specify it twice.
    • Compiler. Clang 64 bit (OS X) versus 32 bit (iOS Simulator).
    • Mkspec. OS X has none, while iOS Simulator has unsupported/macx-ios-clang.

    The kit is all I need to change to produce the error. I had previously disabled the 'make' build step while using iOS Simulator, but I reenabled it just to make sure it wasn't doing anything useful with the file qmake didn't bother to regenerate.

    Where can I hunt this problem?

    EDIT2: My iOS Simulator sysroot does contain an include directory with the "missing" includes.

    EDIT3: QtWidgets is the only include mentioned in the source; the complaint about QtCore/qglobal.h comes from qrc_qtview.cpp, a generated file.

    EDIT1: Oh, and here's my .pro:
    @TEMPLATE = app
    TARGET = qt-ios-demo
    INCLUDEPATH += .
    QT += core widgets

    Input

    SOURCES +=
    main.cpp
    qtview.cpp

    RESOURCES +=
    qtview.qrc

    cache()

    HEADERS +=
    qtview.h
    @



  • I was triggering the code highlighted here, in my kit: http://qt.gitorious.org/qt-creator/qt-creator/commit/cfb11436bf0e86d1de22b2002d381c6c09dde161/diffs I asked about this on IRC and was advised that Qt might have been configured incorrectly, so I uninstalled that build and reinstalled. But that didn't solve the problem.

    I then began to fiddle with Preferences > Build & Run, and clicked Build All on each of my Qt Versions. That made the warning go away; XCode found something else to complain about, but Creator still thinks I have the same problem (per the squiggly line).

    XCode's new problem is:
    @ld: file not found: /Users/chris/Code/Qt/qtbase-ios-simulator/plugins/platforms/libqios_debug.a
    clang: error: linker command failed with exit code 1 (use -v to see invocation)@

    I have libqios.a, but not libqios_debug.a.



  • I switched the build type to Release and the problem went away.


Log in to reply
 

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