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. [SOLVED]iOS linker errors in libQt5Gui
QtWS25 Last Chance

[SOLVED]iOS linker errors in libQt5Gui

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 2 Posters 3.7k Views
  • 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.
  • S Offline
    S Offline
    steno
    wrote on last edited by
    #1

    I'm trying to use Qt 5.2 rc1 to target iOS. I get everything compiling fine, but I get linker errors in libQt5Gui.

    @
    Undefined symbols for architecture armv7:
    "_deflateReset", referenced from:
    _png_zlib_release in libQt5GUI_debug.a(pngwutil.o)
    (maybe you meant: _zarch_deflateReset)
    "deflateInit2", referenced from:
    _png_zlib_claim in libQt5GUI_debug.a(pngwutil.o)
    deflate(unsigned char*, unsigned long*, unsigned char const*, unsigned long) in libQt5GUI_debug.a(qzip.o)
    (maybe you meant: zarch_deflateInit2)
    "_inflateEnd", referenced from:
    qt_inflateGZipDataFrom(QIODevice*) in libQt5Svg_debug.a(qsvgtinydocument.o)
    _png_read_destroy in libQt5GUI_debug.a(pngread.o)
    (maybe you meant: _zarch_inflateEnd)
    "_deflate", referenced from:
    _png_write_flush in libQt5GUI_debug.a(pngwrite.o)
    _png_text_compress in libQt5GUI_debug.a(pngwutil.o)
    _png_write_finish_row in libQt5GUI_debug.a(pngwutil.o)
    _png_write_filtered_row in libQt5GUI_debug.a(pngwutil.o)
    deflate(unsigned char*, unsigned long*, unsigned char const*, unsigned long) in libQt5GUI_debug.a(qzip.o)
    (maybe you meant: _zarch_deflateParams, _zarch_deflatePrime , _zarch_deflateReset , _zarch_deflateEnd , _zarch_deflate , zarch_deflateInit2 , _zarch_deflateSetDictionary , _zarch_deflateCopy , _zarch_deflate_copyright , _zarch_deflateBound , zarch_deflateInit , _zarch_deflateTune , _zarch_deflateSetHeader )
    "_deflateEnd", referenced from:
    _png_write_destroy in libQt5GUI_debug.a(pngwrite.o)
    _png_zlib_claim in libQt5GUI_debug.a(pngwutil.o)
    deflate(unsigned char*, unsigned long*, unsigned char const*, unsigned long) in libQt5GUI_debug.a(qzip.o)
    (maybe you meant: _zarch_deflateEnd)
    "inflateInit", referenced from:
    _png_create_read_struct_2 in libQt5GUI_debug.a(pngread.o)
    (maybe you meant: zarch_inflateInit)
    "inflateInit2", referenced from:
    qt_inflateGZipDataFrom(QIODevice*) in libQt5Svg_debug.a(qsvgtinydocument.o)
    (maybe you meant: zarch_inflateInit2)
    "_inflate", referenced from:
    qt_inflateGZipDataFrom(QIODevice*) in libQt5Svg_debug.a(qsvgtinydocument.o)
    _png_read_row in libQt5GUI_debug.a(pngread.o)
    _png_inflate in libQt5GUI_debug.a(pngrutil.o)
    _png_read_finish_row in libQt5GUI_debug.a(pngrutil.o)
    (maybe you meant: _zarch_inflate_copyright, _zarch_inflateUndermine , _zarch_inflateSync , _zarch_inflateGetHeader , _zarch_inflateSyncPoint , _zarch_inflate , zarch_inflateInit2 , _zarch_inflate_table , _zarch_inflateMark , _zarch_inflateCopy , zarch_inflateInit , _zarch_inflateReset , _zarch_inflateSetDictionary , _zarch_inflateReset2 , _zarch_inflatePrime , _zarch_inflateEnd , _zarch_inflate_fast )
    "_inflateReset", referenced from:
    qt_inflateGZipDataFrom(QIODevice*) in libQt5Svg_debug.a(qsvgtinydocument.o)
    _png_inflate in libQt5GUI_debug.a(pngrutil.o)
    _png_read_finish_row in libQt5GUI_debug.a(pngrutil.o)
    (maybe you meant: _zarch_inflateReset, _zarch_inflateReset2 )
    "OBJC_CLASS$_UIDevice", referenced from:
    objc-class-ref in libQt5Core_debug.a(qcore_mac_objc.o)
    "_crc32", referenced from:
    _png_reset_crc in libQt5GUI_debug.a(png.o)
    _png_calculate_crc in libQt5GUI_debug.a(png.o)
    QZipWriterPrivate::addEntry(QZipWriterPrivate::EntryType, QString const&, QByteArray const&) in libQt5GUI_debug.a(qzip.o)
    (maybe you meant: _BZ2_crc32Table, _zarch_crc32_combine , _zarch_crc32_combine64 , _zarch_crc32 )
    "_uncompress", referenced from:
    qUncompress(unsigned char const*, int) in libQt5Core_debug.a(qbytearray.o)
    (maybe you meant: __ZN4CJAM14jam_uncompressEPclS0_li)
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    @

    Does anyone have any idea what I might be doing wrong?

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

      Hi,

      Are you trying to compile your application for a device using the simulator Qt build ?

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

        I am compiling my application for a device build using what I believe is the device libraries. I used qt-mac-opensource-5.2.0-rc1-ios-x86_64-offline.dmg to install the qt libraries, and am linking to the lib's that don't have the -iPhonesimulator suffix on them.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          steno
          wrote on last edited by
          #4

          I was able to get rid of most of those linker errors by adding -lz to other linker flags in xcode. Now I am stuck with just one last linker error. Which is as fallows.

          @
          Undefined symbols for architecture armv7:
          "OBJC_CLASS$_UIDevice", referenced from:
          objc-class-ref in libQt5Core_debug.a(qcore_mac_objc.o)
          ld: symbol(s) not found for architecture armv7
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          @

          1 Reply Last reply
          0
          • S Offline
            S Offline
            steno
            wrote on last edited by
            #5

            To fix the last linker warning I linked to the UIKit framework.

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

              I'm surprised that you needed to link to them by hand, it should be done for you.

              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

              • Login

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