[Solved]Some QML undefined reference to "Q..." errors



  • Hello guys, i hope someone could help me.

    i'm new at qml so i hope someone could help me . :)

    I'm testing the calling function example of this link "here":http://doc.qt.digia.com/4.7-snapshot/qtbinding.html
    But after i compile i get some undefined references so it means, that i have forget to link some libraries, but which one
    i have forget?
    Google couldn't help me.

    Here my errors

    @
    main.cpp:(.text+0x1f): undefined reference to QDeclarativeEngine::QDeclarativeEngine(QObject*)' main.cpp:(.text+0x56): undefined reference toQDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine*, QString const&, QObject*)'
    make: Leaving directory /home/demonking/Development/QML/Project' main.cpp:(.text+0x76): undefined reference toQDeclarativeComponent::create(QDeclarativeContext*)'
    main.cpp:(.text+0x3f9): undefined reference to QDeclarativeComponent::~QDeclarativeComponent()' main.cpp:(.text+0x401): undefined reference toQDeclarativeEngine::~QDeclarativeEngine()'
    main.cpp:(.text+0x578): undefined reference to QDeclarativeComponent::~QDeclarativeComponent()' main.cpp:(.text+0x580): undefined reference toQDeclarativeEngine::~QDeclarativeEngine()'
    @

    I'm working on linux and using the qt-creator 2.5.2 with qt 4.8.2



  • Did you add
    @
    QT += declarative
    @

    in .pro file?



  • Ah, thx a lot :)
    I haven't seen that i have missed the line



  • Please add [solved] to topic of post, so other user will know that problem was solved :)


Log in to reply
 

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