Adding webkit webkitwidgets to .pro causes undefined references during linking.



  • Greetings:

    I am using Qt 5.0.0 on Redhat 6.3

    I wanted to add a QWebView to a project I am currently working on.
    When I add 'webkit' and 'webkitwidgets' to the QT variable in the .pro file I am getting 'undefined reference' errors during linking. I have not as of yet actually included a QWebView in any headers yet.

    The start of of my .pro file:
    #-------------------------------------------------

    Project created by QtCreator 2013-02-19T11:40:20

    #-------------------------------------------------

    QT += core gui network webkit

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets webkitwidgets

    Compile output:
    g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_QML_DEBUG -DQT_DECLARATIVE
    _DEBUG -DQT_WEBKITWIDGETS_LIB -DQT_QUICK_LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_QML_LIB -DQT_WEBKIT_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB -DQT_GUI_LIB -
    DQT_CORE_LIB -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/mkspecs/linux-g++-64 -I../../yardmaster -I../../../../include -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtWebKitWidgets -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtQuick -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtOpenGL -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtPrintSupport -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtQml -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtWebKit -I../../../../../../../../../Qt5.0.0/5.0.0/gcc
    64/include/QtWidgets -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtNetwork -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtGui -I../../../../../../../../../Qt5.0.0/5.0.0/gcc_64/include/QtCore -I. -I. -I. -o moc_lo
    ginwindow.o moc_loginwindow.cpp
    g++ -m64 -Wl,-rpath,/home/dmb/Qt5.0.0/5.0.0/gcc_64 -Wl,-rpath,/home/dmb/Qt5.0.0/5.0.0/gcc_64/lib -o yms main.o mainwindow.o trackwidget.o consistwidget.o rsuwid
    get.o track.o train.o consist.o rsu.o yardmodel.o observer.o observable.o notify.o consistwindow.o yardcontroller.o loginwindow.o moc_mainwindow.o moc_trackwidget.o moc_consistwidget.o moc_rsuwidget.o moc_consistwindow.o moc_yardcontroller.o moc_loginwindow.o -L/usr/X11R6/lib64 -L/usr/lib64 -L/home/dmb/dev/qtextlib -L/home/dmb/Qt5.0.0/5.0.0/gcc_64/lib -lQt5WebKitWidgets -lQt5Quick -lQt5OpenGL -lQt5PrintSupport -lQt5Qml -lQt5WebKit -lQt5Widgets -lQt5Network -lQt5Gui -lQt5Cor
    e -lGL -lpthread
    /home/dmb/Qt5.0.0/5.0.0/gcc_64/lib/libQt5WebKit.so: undefined reference to deflateBound@ZLIB_1.2.0' /home/dmb/Qt5.0.0/5.0.0/gcc_64/lib/libQt5WebKit.so: undefined reference tog_variant_ref'
    /home/dmb/Qt5.0.0/5.0.0/gcc_64/lib/libQt5WebKit.so: undefined reference to gst_x_overlay_set_window_handle' /home/dmb/Qt5.0.0/5.0.0/gcc_64/lib/libQt5WebKit.so: undefined reference togst_query_parse_nth_buffering_range'
    /home/dmb/Qt5.0.0/5.0.0/gcc_64/lib/libQt5WebKit.so: undefined reference to g_va riant_unref' /home/dmb/Qt5.0.0/5.0.0/gcc_64/lib/libQt5WebKit.so: undefined reference togst

    element_link_pads_full'
    /home/dmb/Qt5.0.0/5.0.0/gcc_64/lib/libQt5WebKit.so: undefined reference to gst_is_initialized' /home/dmb/Qt5.0.0/5.0.0/gcc_64/lib/libQt5WebKit.so: undefined reference togst_query_get_n_buffering_ranges'
    collect2: ld returned 1 exit status


  • Lifetime Qt Champion

    Hi and welcome to DevNet,

    Seeing the name of the missing functions, I would say that you are missing gstreamer libraries.



  • Thats what I thought at first as well, but I confirmed they exist in /usr/lib64 and I checked the exact name against the dependency reported by running readelf -d on libQt5WebKit.so

    libgstreamer listing
    ls -l /usr/lib64/libgstream*
    lrwxrwxrwx. 1 root root 27 Mar 27 2012 /usr/lib64/libgstreamer-0.10.so -> libgstreamer-0.10.so.0.25.0
    lrwxrwxrwx. 1 root root 27 Mar 27 2012 /usr/lib64/libgstreamer-0.10.so.0 -> libgstreamer-0.10.so.0.25.0
    -rwxr-xr-x. 1 root root 926944 Jun 17 2010 /usr/lib64/libgstreamer-0.10.so.0.25.0

    readelf result:
    readelf -d libQt5WebKit.so.5.0.0

    Dynamic section at offset 0x1fff290 contains 54 entries:
    Tag Type Name/Value
    0x0000000000000001 (NEEDED) Shared library: [libQt5Core.so.5]
    0x0000000000000001 (NEEDED) Shared library: [librt.so.1]
    0x0000000000000001 (NEEDED) Shared library: [libz.so.1]
    0x0000000000000001 (NEEDED) Shared library: [libXrender.so.1]
    0x0000000000000001 (NEEDED) Shared library: [libXcomposite.so.1]
    0x0000000000000001 (NEEDED) Shared library: [libpng12.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libicui18n.so.49]
    0x0000000000000001 (NEEDED) Shared library: [libicuuc.so.49]
    0x0000000000000001 (NEEDED) Shared library: [libQt5Quick.so.5]
    0x0000000000000001 (NEEDED) Shared library: [libQt5Qml.so.5]
    0x0000000000000001 (NEEDED) Shared library: [libQt5Network.so.5]
    0x0000000000000001 (NEEDED) Shared library: [libpthread.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libQt5Gui.so.5]
    0x0000000000000001 (NEEDED) Shared library: [libQt5Sql.so.5]
    0x0000000000000001 (NEEDED) Shared library: [libGL.so.1]
    0x0000000000000001 (NEEDED) Shared library: [libX11.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libxslt.so.1]
    0x0000000000000001 (NEEDED) Shared library: [libxml2.so.2]
    0x0000000000000001 (NEEDED) Shared library: [libglib-2.0.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libgobject-2.0.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libgstreamer-0.10.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libgstapp-0.10.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libgstbase-0.10.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libgstinterfaces-0.10.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libgstpbutils-0.10.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libgstvideo-0.10.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libsqlite3.so.0]
    0x0000000000000001 (NEEDED) Shared library: [libstdc++.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libm.so.6]
    0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
    0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
    0x000000000000000e (SONAME) Library soname: [libQt5WebKit.so.5]
    0x000000000000000f (RPATH) Library rpath: [$ORIGIN]
    0x000000000000000c (INIT) 0x452120
    0x000000000000000d (FINI) 0x18769b8
    0x0000000000000019 (INIT_ARRAY) 0x2061770
    0x000000000000001b (INIT_ARRAYSZ) 104 (bytes)
    0x000000006ffffef5 (GNU_HASH) 0x1f0
    0x0000000000000005 (STRTAB) 0x25298
    0x0000000000000006 (SYMTAB) 0x5450
    0x000000000000000a (STRSZ) 207830 (bytes)
    0x000000000000000b (SYMENT) 24 (bytes)
    0x0000000000000003 (PLTGOT) 0x2203fe8
    0x0000000000000002 (PLTRELSZ) 46728 (bytes)
    0x0000000000000014 (PLTREL) RELA
    0x0000000000000017 (JMPREL) 0x446a98
    0x0000000000000007 (RELA) 0x5ab18
    0x0000000000000008 (RELASZ) 4112256 (bytes)
    0x0000000000000009 (RELAENT) 24 (bytes)
    0x000000006ffffffe (VERNEED) 0x5a8f8
    0x000000006fffffff (VERNEEDNUM) 10
    0x000000006ffffff0 (VERSYM) 0x57e6e
    0x000000006ffffff9 (RELACOUNT) 164115
    0x0000000000000000 (NULL) 0x0

    EDIT: Spelling.


  • Lifetime Qt Champion

    You might not have a recent enough gstreamer lib set installed



  • I'm going to have to agree. Everything I have done on my end regarding this issue points to the same conclusion.
    Looks like I'm stuck unless I can get the admin to update the gstreamer lib and its dependencies to something newer, or gain access to a Fedora box.
    Appreciate the assistance.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.