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. Compiling Qt lib for iOS - 5.2.0
Forum Updated to NodeBB v4.3 + New Features

Compiling Qt lib for iOS - 5.2.0

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 3 Posters 3.3k 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.
  • M Offline
    M Offline
    Max13
    wrote on last edited by
    #1

    Hello all !

    I'm working on "QCA":http://quickgit.kde.org/?p=qca.git (Qt Cryptographic Architecture) and we're working on updating it for Qt5 while keeping Qt4 compatibility. I'm trying to compile an app which uses QCA lib for iOS using Qt 5.2.0 (compiled from sources).

    QCA uses cmake, I'm experiencing some issues when compiling with cmake, here are my command lines
    @$ QTDIR=~/Qt5.2.0/5.2.0/ios PATH=~/Qt5.2.0/5.2.0/ios/bin:$PATH cmake -D CMAKE_BUILD_TYPE=Debug . // No problem
    [...]
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /Users/Max13/Developpement/QCA
    $ QTDIR=~/Qt5.2.0/5.2.0/ios PATH=~/Qt5.2.0/5.2.0/ios/bin:$PATH make
    [ 1%] Building CXX object src/CMakeFiles/qca.dir/qca_cert.cpp.o
    [... some warnings ...]
    [ 31%] Building CXX object src/CMakeFiles/qca.dir/moc_qca_safeobj.cpp.o
    Linking CXX shared library ../lib/libqca_debug.dylib
    ld: warning: ignoring file /Users/Max13/Qt5.2.0/5.2.0/ios/lib/libQt5Core_debug.a, file was built for archive which is not the architecture being linked (x86_64): /Users/Max13/Qt5.2.0/5.2.0/ios/lib/libQt5Core_debug.a
    Undefined symbols for architecture x86_64:
    "qt_assert_x(char const*, char const*, char const*, int)", referenced from:
    QListQCA::CertificateInfoPair::operator const in qca_cert.cpp.o
    QList<QString>::operator in qca_cert.cpp.o
    QList<int>::operator const in qca_cert.cpp.o
    QListQCA::Certificate::operator in qca_cert.cpp.o
    QListQCA::CRL::operator in qca_cert.cpp.o
    QListQCA::Certificate::takeAt(int) in qca_cert.cpp.o
    QListQCA::CertContext*::operator in qca_cert.cpp.o
    ...@

    Here is the "./configure" command line for Qt 5.2.0, which I've make'd today without issue:
    @./configure -prefix /Users/Max13/Qt5.2.0/5.2.0-iOS -debug-and-release -opensource -confirm-license -nomake examples -silent -xplatform macx-ios-clang@

    Do you guys have an idea on why this issue and how to fix it please? Thanks.

    We all have started by asking questions. Then after some time, we can begin answering them.

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

      Hi,

      Are you sure the paths are correct ? It looks like the prefix of your configure line doesn't match with what you give to cmake

      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
      • M Offline
        M Offline
        Max13
        wrote on last edited by
        #3

        The path is correct, but I think the problem is this: "/Users/Max13/Qt5.2.0/5.2.0/ios/lib/libQt5Core_debug.a, file was built for archive which is not the architecture being linked (x86_64)"

        I think I understand what it means, but not how to make it work :/

        We all have started by asking questions. Then after some time, we can begin answering them.

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

          What does

          @lipo -info libQt5Core_debug.a@

          return ?

          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
          • M Offline
            M Offline
            Max13
            wrote on last edited by
            #5

            @MacBook-Pro-de-Adnan:build Max13$ lipo -info /Users/Max13/Qt5.2.0/5.2.0/ios/lib/libQt5Core_debug.a
            input file /Users/Max13/Qt5.2.0/5.2.0/ios/lib/libQt5Core_debug.a is not a fat file
            Non-fat file: /Users/Max13/Qt5.2.0/5.2.0/ios/lib/libQt5Core_debug.a is architecture: armv7@

            I think I'm getting it. I was building for iPhone-Simulator, I think it's trying to link with the wrong library (as I've noticed that I have some *_iphonesimulator.a"

            We all have started by asking questions. Then after some time, we can begin answering them.

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

              Looks like it indeed. Both don't use the same architecture. To avoid this, you could try to do a simulator only build so you'll ensure that you only have one set of libraries to link to (at least to start your tests)

              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
              • M Offline
                M Offline
                Max13
                wrote on last edited by
                #7

                I'll try to force linking with the correct file, thx.

                Will tell you when I have news.

                We all have started by asking questions. Then after some time, we can begin answering them.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  MaxL
                  wrote on last edited by
                  #8

                  Do you have any updates on linking with the right library ? I'm also facing this issue ( using the Digia provided installer for Qt 5.2.0 on iOS )

                  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