Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. XCode not building dependencies
Forum Updated to NodeBB v4.3 + New Features

XCode not building dependencies

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 4 Posters 2.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    DRoscoe
    wrote on last edited by DRoscoe
    #1

    I have a large Qt application that I build and run on Windows/Linux/iOS. I recently switch from a SUBDIRS project with an ordered build structure to a dependency-based build structure. My Windows and Linux builds are fine, but my iOS build refuses to follow the dependency tree and build the dependencies. Here is my top-level project file:

    CONFIG += c++11
    TEMPLATE = subdirs
    
    SUBDIRS = \
        tap_display_app \ # main executable
        aop_logger \
        aop_xml \
        aop_serial \
        aop_comm_base \
        aop_util \
        aop_measure \
        MoreMath \
        MathUtilities \
        DataCollection \
        DebugLogger \
        BufferedSharedMemory \
        AvionicsBus \
        AircraftDataModel \
        WindModel \
        TableLookups \
        configuration \
        AtosUtils \
        dna \
        aop_data \
        aop_comm \
        tap_data \
        tap_messaging \
        RouteContainer \
        arinc_io_adapter \
        aop_interface \
        tap_common
    
    tap_display_app.subdir = tap_display_app
    aop_logger.subdir = aop_logger
    aop_xml.subdir = aop_xml
    aop_comm_base.subdir = aop_comm_base
    aop_util.subdir = aop_util
    aop_measure.subdir = aop_measure
    MoreMath.subdir = MoreMath
    MathUtilities.subdir = MathUtilities
    DataCollection.subdir = DataCollection
    DebugLogger.subdir = DebugLogger
    BufferedSharedMemory.subdir = BufferedSharedMemory
    AvionicsBus.subdir = AvionicsBus
    AircraftDataModel.subdir = AircraftDataModel
    WindModel.subdir = WindModel
    TableLookups.subdir = TableLookups
    configuration.subdir = configuration
    AtosUtils.subdir = AtosUtils
    dna.subdir = dna
    aop_interface.subdir = aop_interface
    aop_data.subdir = aop_data
    aop_comm.subdir = aop_comm
    RouteContainer.subdir = RouteContainer
    tap_data.subdir = tap_data
    tap_common.subdir = tap_common
    arinc_io_adapter.subdir = arinc_io_adapter
    tap_messaging.subdir = tap_messaging
    
    tap_display_app.depends = aop_comm_base aop_data aop_interface aop_logger aop_measure aop_serial aop_util aop_xml configuration tap_common tap_data tap_messaging DataCollection TableLookups WindModel
    aop_serial.depends = aop_logger aop_xml
    aop_comm_base.depends = aop_serial
    aop_util.depends = aop_logger aop_xml aop_serial
    aop_measure.depends = aop_util
    AvionicsBus.depends = BufferedSharedMemory MoreMath DebugLogger
    MathUtilities.depends = MoreMath
    DataCollection.depends = MathUtilities
    AircraftDataModel.depends = DebugLogger MoreMath
    WindModel.depends = MoreMath
    configuration.depends = aop_logger aop_measure aop_serial aop_util AtosUtils
    dna.depends = aop_comm_base aop_interface aop_logger
    aop_interface.depends = aop_comm aop_comm_base aop_data aop_logger aop_measure aop_serial aop_util aop_xml configuration AvionicsBus RouteContainer
    aop_data.depends = aop_logger aop_measure aop_serial aop_util aop_xml configuration DataCollection MathUtilities MoreMath WindModel
    aop_comm.depends = aop_comm_base aop_data
    tap_data.depends = aop_data aop_logger aop_measure aop_serial aop_util aop_xml tap_common TableLookups WindModel
    tap_common.depends = aop_util aop_serial
    arinc_io_adapter.depends = aop_data aop_interface aop_logger aop_measure aop_serial aop_util AvionicsBus
    tap_messaging.depends = aop_comm_base aop_logger aop_measure aop_serial aop_util aop_xml tap_common tap_data
    

    The "tap_display_app" is the application's main executable and Xcode defaults to it as its first build target, which is correct. However, when I initiate the build, it only builds the main executable and then fails to link because none of the dependencies were built.

    Any idea why its ignoring the dependencies? Its probably important to point out that it works fine when in Qt Creator. Its only when I create the XCode project files that things go bad. I use the following to generate the XCode project files (from Terminal):

    qmake -spec macx-xcode -recursive
    

    Please don't tell me to go back to an ordered build.

    1 Reply Last reply
    0
    • P Offline
      P Offline
      patrik08
      wrote on last edited by patrik08
      #2

      On linux i make
      qmake file.pro
      Why all this -spec macx-xcode -recursive??
      build this tree in the same way as linux
      qmake && make
      thats all..
      or each dir a static lib...
      OSX Mac is linux in the core..

      D 1 Reply Last reply
      -1
      • P patrik08

        On linux i make
        qmake file.pro
        Why all this -spec macx-xcode -recursive??
        build this tree in the same way as linux
        qmake && make
        thats all..
        or each dir a static lib...
        OSX Mac is linux in the core..

        D Offline
        D Offline
        DRoscoe
        wrote on last edited by
        #3

        @patrik08 I'm not building for Mac, I am building for iOS. You cannot simply run "make". You need to generate XCode project files and tweak them in order to build for iOS. The -recursive is necessary or else the resulting project files will only contain the top-level project and not the projects in the subdirectories

        1 Reply Last reply
        0
        • P Offline
          P Offline
          patrik08
          wrote on last edited by
          #4

          I never open Xcode... only:
          xcodebuild -project QtAndSwift.xcodeproj -configuration "Release"

          xcodebuild i like make ...
          any time to open Xcode .. it takes too much time

          D 1 Reply Last reply
          1
          • P patrik08

            I never open Xcode... only:
            xcodebuild -project QtAndSwift.xcodeproj -configuration "Release"

            xcodebuild i like make ...
            any time to open Xcode .. it takes too much time

            D Offline
            D Offline
            DRoscoe
            wrote on last edited by
            #5

            @patrik08 Have you ever actually built for iOS though? There are settings that need to be set, which I have yet to figure out how to do with qmake. For example, selecting the target to be built, setting our team for provisioning, disabling bitcode and installing the target on a device. If I could do these things without running XCode, then perhaps your solution would be helpful.

            1 Reply Last reply
            0
            • P Offline
              P Offline
              patrik08
              wrote on last edited by
              #6

              Try to build a simply hello world for IOS in cmake
              its easy
              https://github.com/sheldonth/ios-cmake
              && xcodebuild
              The New QT Creator have also a better Cmake support ... well done..

              David & Goliad...
              like MuPDF vs poppler load a 20MB pdf
              the differences make an impression

              D 1 Reply Last reply
              1
              • P patrik08

                Try to build a simply hello world for IOS in cmake
                its easy
                https://github.com/sheldonth/ios-cmake
                && xcodebuild
                The New QT Creator have also a better Cmake support ... well done..

                David & Goliad...
                like MuPDF vs poppler load a 20MB pdf
                the differences make an impression

                D Offline
                D Offline
                DRoscoe
                wrote on last edited by
                #7

                @patrik08 Thats an excellent example. I may be able to use it.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kuzulis
                  Qt Champions 2020
                  wrote on last edited by
                  #8

                  Guys, is any qmake's workaround for this issue? Because I'm too faced with this: https://bugreports.qt.io/browse/QTBUG-71566

                  It makes the qmake && qt unusable at all in real development.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @kuzulis Did you test the command provided after the UPD comment on the bug report ?

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kuzulis
                      Qt Champions 2020
                      wrote on last edited by
                      #10

                      That command provided by QtCreator and called automatically.. I have updated the bug-report.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved