[SOLVED]iOS linker errors in libQt5Gui
-
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?
-
Hi,
Are you trying to compile your application for a device using the simulator Qt build ?
-
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.
-
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)
@ -
I'm surprised that you needed to link to them by hand, it should be done for you.