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

QML Extension make install gives Errors



  • I tryed to create a QML Plugin with QTCreator. I used the template "QtQuick 2 QML Extension Plugin".

    So far so good I could build it as debug and as release.

    From what I understand to register it to be used from QML I have to use make install on the build folder.

    The Debug Build looks like it installs successfully but the release gives errrors:

    317d7fd5-ea35-4d55-bdee-ba2d929b19bf-image.png

    What could be the cause? I have to build it sucessfully as release not as debug right?

    edit: some more infomrations.

    The folders look like this:

    Debug:
    9e8f217a-3170-4c16-8a93-0a9cc88fd148-image.png

    Release:
    d82499aa-f3d1-47fe-9800-bc05eddd379d-image.png

    qmldir the file I believe make install complains about contains in both folders this:

    module org.example.io
    plugin fileio
    

    If you need more information let me know



  • Nobody an idea what I could check?


  • Lifetime Qt Champion

    Hi
    On windows, to use Designer plugins (with Creator) it has to be compiled as 32 bit as Creator is a 32 bit app.
    alt text

    I would assume the same goes for QML plugins.

    Must use same compiler and Qt version.

    You seems to compile to 64 bit and that would explain the
    "File format not recognized"



  • Well Im on Linux and my Creator says:

    fb30be97-75c2-48ac-8061-a7f1d9f02256-image.png

    So it should be 64 bit or not?


  • Lifetime Qt Champion

    @sandro4912

    Yes. correct. and Qt 5.14 using gcc around 5.3
    and in release mode. ( normally)

    But it seems its a strip command that gives an error?



  • Yes but what does that mean.

    The strange thing is in debug it looks like it creates the lib as you can see in the screenshot above.


  • Lifetime Qt Champion

    @sandro4912

    well it seems to call strip on the qmldir and hence the error
    Not sure why.



  • well what does strip anyway? in debug it wasn't even called


  • Lifetime Qt Champion

    @sandro4912
    Not sure what it is used for.
    I wondering if you have anything extra in the .pro file ?
    https://forum.qt.io/topic/39263/resolved-installs-add-strip-command-to-makefile



  • pro file looks like this:

    TEMPLATE = lib
    TARGET = fileio
    QT += qml quick
    CONFIG += plugin c++11
    
    TARGET = $$qtLibraryTarget($$TARGET)
    uri = org.example.io
    
    # Input
    SOURCES += \
            fileio.cpp \
            fileio_plugin.cpp
    
    HEADERS += \
            fileio.h \
            fileio_plugin.h
    
    DISTFILES = qmldir
    
    !equals(_PRO_FILE_PWD_, $$OUT_PWD) {
        copy_qmldir.target = $$OUT_PWD/qmldir
        copy_qmldir.depends = $$_PRO_FILE_PWD_/qmldir
        copy_qmldir.commands = $(COPY_FILE) "$$replace(copy_qmldir.depends, /, $$QMAKE_DIR_SEP)" "$$replace(copy_qmldir.target, /, $$QMAKE_DIR_SEP)"
        QMAKE_EXTRA_TARGETS += copy_qmldir
        PRE_TARGETDEPS += $$copy_qmldir.target
    }
    
    qmldir.files = qmldir
    unix {
        installPath = $$[QT_INSTALL_QML]/$$replace(uri, \., /)
        qmldir.path = $$installPath
        target.path = $$installPath
        INSTALLS += target qmldir
    }
    

    I did not modify it at all. I just let Creator autocreate it. I choosed "QT Quick 2 Extension Plugin" as project template


Log in to reply