Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How can i compile Qt example application that used QtQuick, QtQml on QtCreator?



  • Hi,
    I had compiled Embedded Device of qt5 using yocto. (in case i had used meta-toolchain-qt5)
    And then install SDK using the script that created by after compile,
    Try to use the SDK in QtCreator Tool.

    But some error was occurred when i import application from Qt example, (likes: todos)
    Error message:
    cannot find -lQt5Quick
    cannot find -lQt5Qml
    collect2: error: ld returned 1 exit status

    Here is content of todos.pro file

    TEMPLATE = app
    
    DEFINES += ENGINIO_SAMPLE_NAME=\\\"todo\\\"
    
    include(../../common/backendhelper/qmlbackendhelper.pri)
    
    QT += quick qml enginio
    SOURCES += ../main.cpp
    
    mac: CONFIG -= app_bundle
    
    OTHER_FILES += todo.qml
    RESOURCES += todo.qrc
    

    How can i do to solve this error?
    Please share your wisdom.

    Thanks
    ricky


  • Lifetime Qt Champion

    Did you compile Qt5Quick and lQt5Qml?



  • @jsulm

    Did you compile Qt5Quick and lQt5Qml?

    I had tried to compile Qt5Quick, Qt5Qml..
    But i can't..
    Can you let me know, how to compile Qt5Quick, Qt5Qml?

    Thank you.


  • Lifetime Qt Champion

    Like any other Qt module.
    Why can't you build these modules? What was the problem?



  • @jsulm
    here is my whole step.. please kindly check.

    I had compiled Qt5Quick, Qt5Qml by yocto like any other Qt moulde.

    And then do Installed SDK using script that created by after compile.
    file name is build/tmp/deploy/sdk/oecore-x86_64-corei7-64-toolchain-nodistro.0.sh

    After install, sdk was installed under the path in host pc. (/usr/local/oecore-x86-64/... ... )
    i can show libQt5Quick.so, libQt5Qml.so in sdk path. (/usr/local/oecore-x86-64/sysroot/corei7-64-poky-linux/usr/lib/)

    After Then try to use this SDK in QtCreator Tool.
    But Some error was occurred when i import application from Qt example. (likes: todos)
    Error message:
    cannot find -lQt5Quick
    cannot find -lQt5Qml
    collect2: error: ld returned 1 exit status

    How can i do..to solve this error?
    Thanks.


  • Lifetime Qt Champion

    Just to be sure: you're really using that SDK in QtCreator? Do you have a Kit in QtCreator configured to use this SDK?



  • @jsulm Yes, of cause.
    I made a Qt Kit in QtCreator.


Log in to reply