QQuickView in a Library



  • Why I can't use QQuickView in a subdir library project. Whenever I call it I get the following output:

    DEBUG:
    @
    Qt5/5.0.0/gcc/include/QtQml/qqmldebug.h:61: undefined reference to QQmlDebuggingEnabler::QQmlDebuggingEnabler(bool)' application.cpp:7: undefined reference toQQuickView::QQuickView(QWindow*)'
    libApplication.a(application.o): In function __static_initialization_and_destruction_0': Qt5/5.0.0/gcc/include/QtQml/qqmldebug.h:61: undefined reference toQQmlDebuggingEnabler::QQmlDebuggingEnabler(bool)'
    @

    RELEASE:
    @
    application.cpp:(.text+0x63): undefined reference to `QQuickView::QQuickView(QWindow*)'
    @

    Here is a copy of my .pro file
    @QT += network opengl widgets quick

    TARGET = Application
    TEMPLATE = lib
    CONFIG += staticlib

    SOURCES += application.cpp

    HEADERS += application.h
    unix:!symbian {
    maemo5 {
    target.path = /opt/usr/lib
    } else {
    target.path = /usr/lib
    }
    INSTALLS += target
    }
    @



  • I know it's a reply after year and a half , but I'll put it just in case someone else needs it :-) .

    Since I'm assuming this is GCC/Linux (and it looks like one :-) ), you need to install qt quick from your package manager. Many distros (like Ubuntu) don't include entire Qt Liibrary in one package (maybe because of the size), and you just need to install everything from package manager.

    If it's ubuntu just look up "qt quick" in Synaptic.

    Hope this helps!
    Cheers!
    Dushan



  • : ) Thanks for the response and for the answer. I have no way to test it, but I am pretty sure that's the solution. Thanks!


Log in to reply
 

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