Qt5 static and CMAKE = undefine references
-
Hi everyone,
I have a static version of Qt that i would like to use with cmake.
While everything works fine if Qt is shared, when using the static version, i get the following :@
OBJC_CLASS$_NSString", referenced from:
objc-class-ref in libQt5Core_debug.a(qstring_mac.o)
"_SecKeychainFindInternetPassword", referenced from:
getProxyAuth(QString const&, QString const&, QString&, QString&) in libQt5Network_debug.a(qnetworkaccessmanager.o)
"_SecKeychainItemCopyContent", referenced from:
getProxyAuth(QString const&, QString const&, QString&, QString&) in libQt5Network_debug.a(qnetworkaccessmanager.o)
"_SecKeychainItemFreeContent", referenced from:
getProxyAuth(QString const&, QString const&, QString&, QString&) in libQt5Network_debug.a(qnetworkaccessmanager.o)
"_compress2", referenced from:
qCompress(unsigned char const*, int, int) in libQt5Core_debug.a(qbytearray.o)
"_crc32", referenced from:
_png_reset_crc in libQt5Gui_debug.a(png.o)
_png_calculate_crc in libQt5Gui_debug.a(png.o)
"_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)
QSpdyProtocolHandler::composeHeader(QHttpNetworkRequest const&) in libQt5Network_debug.a(qspdyprotocolhandler.o)
"_deflateEnd", referenced from:
_png_write_destroy in libQt5Gui_debug.a(pngwrite.o)
_png_zlib_claim in libQt5Gui_debug.a(pngwutil.o)
QSpdyProtocolHandler::~QSpdyProtocolHandler() in libQt5Network_debug.a(qspdyprotocolhandler.o)
"deflateInit2", referenced from:
_png_zlib_claim in libQt5Gui_debug.a(pngwutil.o)
"deflateInit", referenced from:
QSpdyProtocolHandler::QSpdyProtocolHandler(QHttpNetworkConnectionChannel*) in libQt5Network_debug.a(qspdyprotocolhandler.o)
"_deflateReset", referenced from:
_png_zlib_release in libQt5Gui_debug.a(pngwutil.o)
"_glBindTexture", referenced from:
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext*) in libQt5Gui_debug.a(qopenglfunctions.o)
"_glBlendFunc", referenced from:
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext*) in libQt5Gui_debug.a(qopenglfunctions.o)
"_glClear", referenced from:
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext*) in libQt5Gui_debug.a(qopenglfunctions.o)
"_glClearColor", referenced from:
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext*) in libQt5Gui_debug.a(qopenglfunctions.o)
"_glClearDepth", referenced from:
qopenglfTranslateClearDepthf(float) in libQt5Gui_debug.a(qopenglfunctions.o)
"_glClearStencil", referenced from:
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext*) in libQt5Gui_debug.a(qopenglfunctions.o)
"_glColorMask", referenced from:
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext*) in libQt5Gui_debug.a(qopenglfunctions.o)@( Output is bigger than that but it has been cut to fit the post )
Am i missing some libraries to link against or is coming from the .cmake provided by Qt that is missing some linking steps ?
-
With a little bit of work,
I get it working by finding and linking with:
Foundation
CoreGraphics
CoreText
Security
opengl
z
qtharfbuzzngbut this should be done within Qt .cmake file right ?