Application crash when it run with Qt creator but works after "deploy"



  • Hi,
    I have a problem with several applications using hidapi on Windows. Last week, it worked but for a couple of day, it crash.

    • I have no error during building.
    • if I copy .exe files on folder with useful dll, I can run the application without problem.
    • I have reinstall Qt without success.
    • It works on another PC (on windows 8). My computer is under Windows 10 (I had the same problem on Windows 7 yesterday, before updating my Windows version).
    • When I comment the line calling function of the library, it works

    I don't know where to look.

    main.cpp :

    #include <QGuiApplication>
    #include <QQmlApplicationEngine>
    #include "hidapi.h"
    
    int main(int argc, char *argv[])
    {
        QGuiApplication app(argc, argv);
    
        QQmlApplicationEngine engine;
    
        struct hid_device_info *devs=NULL;
        devs = hid_enumerate(0x0, 0x0); //If I comment this line, it works 
        engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
    
        return app.exec();
    }
    

    .pro

    TEMPLATE = app
    
    QT += qml quick
    CONFIG += c++11
    
    SOURCES += main.cpp
    
    RESOURCES += qml.qrc
    
    # Additional import path used to resolve QML modules in Qt Creator's code model
    QML_IMPORT_PATH =
    
    # Default rules for deployment.
    include(deployment.pri)
    
    LIBS += -L$$PWD/ -lhidapi
    
    INCLUDEPATH += $$PWD/
    DEPENDPATH += $$PWD/
    

    folder Qt project :
    test/
    |__ dedployment.pri
    |__ hidapi.dll
    |__ hidapi.h
    |__ main.cpp
    |__ main.qml
    |__ qml.qrc
    |__ test.pro
    |__ test.pro.user

    and the Makefile :

    #############################################################################
    # Makefile for building: test
    # Generated by qmake (3.0) (Qt 5.2.1)
    # Project:  ..\test\test.pro
    # Template: app
    # Command: C:\Qt\5.2.1\mingw48_32\bin\qmake.exe -spec win32-g++ -o Makefile ..\test\test.pro
    #############################################################################
    
    MAKEFILE      = Makefile
    
    first: release
    install: release-install
    uninstall: release-uninstall
    QMAKE         = C:\Qt\5.2.1\mingw48_32\bin\qmake.exe
    DEL_FILE      = del
    CHK_DIR_EXISTS= if not exist
    MKDIR         = mkdir
    COPY          = copy /y
    COPY_FILE     = $(COPY)
    COPY_DIR      = xcopy /s /q /y /i
    INSTALL_FILE  = $(COPY_FILE)
    INSTALL_PROGRAM = $(COPY_FILE)
    INSTALL_DIR   = $(COPY_DIR)
    DEL_FILE      = del
    SYMLINK       = copy /y
    DEL_DIR       = rmdir
    MOVE          = move
    SUBTARGETS    =  \
    		release \
    		debug
    
    
    release: FORCE
    	$(MAKE) -f $(MAKEFILE).Release
    release-make_first: FORCE
    	$(MAKE) -f $(MAKEFILE).Release 
    release-all: FORCE
    	$(MAKE) -f $(MAKEFILE).Release all
    release-clean: FORCE
    	$(MAKE) -f $(MAKEFILE).Release clean
    release-distclean: FORCE
    	$(MAKE) -f $(MAKEFILE).Release distclean
    release-install: FORCE
    	$(MAKE) -f $(MAKEFILE).Release install
    release-uninstall: FORCE
    	$(MAKE) -f $(MAKEFILE).Release uninstall
    debug: FORCE
    	$(MAKE) -f $(MAKEFILE).Debug
    debug-make_first: FORCE
    	$(MAKE) -f $(MAKEFILE).Debug 
    debug-all: FORCE
    	$(MAKE) -f $(MAKEFILE).Debug all
    debug-clean: FORCE
    	$(MAKE) -f $(MAKEFILE).Debug clean
    debug-distclean: FORCE
    	$(MAKE) -f $(MAKEFILE).Debug distclean
    debug-install: FORCE
    	$(MAKE) -f $(MAKEFILE).Debug install
    debug-uninstall: FORCE
    	$(MAKE) -f $(MAKEFILE).Debug uninstall
    
    Makefile: ../test/test.pro ../../../../Qt/5.2.1/mingw48_32/mkspecs/win32-g++/qmake.conf ../../../../Qt/5.2.1/mingw48_32/mkspecs/features/spec_pre.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/qdevice.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/device_config.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/common/shell-win32.conf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/qconfig.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_axbase.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_axbase_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_axcontainer.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_axcontainer_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_axserver.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_axserver_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_bluetooth.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_bluetooth_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_bootstrap_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_clucene_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_concurrent.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_concurrent_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_core.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_core_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_declarative.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_declarative_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_designer.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_designer_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_designercomponents_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_gui.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_gui_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_help.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_help_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_multimedia.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_multimedia_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_multimediawidgets.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_multimediawidgets_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_network.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_network_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_nfc.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_nfc_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_opengl.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_opengl_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_openglextensions.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_openglextensions_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_platformsupport_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_positioning.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_positioning_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_printsupport.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_printsupport_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_qml.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_qml_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_qmldevtools_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_qmltest.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_qmltest_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_qtmultimediaquicktools_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_quick.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_quick_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_quickparticles_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_script.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_script_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_scripttools.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_scripttools_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_sensors.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_sensors_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_serialport.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_serialport_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_sql.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_sql_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_svg.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_svg_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_testlib.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_testlib_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_uitools.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_uitools_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_webkit.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_webkit_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_webkitwidgets.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_webkitwidgets_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_widgets.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_widgets_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_winextras.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_winextras_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_xml.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_xml_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_xmlpatterns.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/modules/qt_lib_xmlpatterns_private.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/qt_functions.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/qt_config.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/win32-g++/qmake.conf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/spec_post.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/exclusive_builds.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/default_pre.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/win32/default_pre.prf \
    		../test/deployment.pri \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/resolve_config.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/exclusive_builds_post.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/default_post.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/c++11.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/win32/rtti.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/warn_on.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/qt.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/resources.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/moc.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/win32/opengl.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/win32/windows.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/testcase_targets.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/exceptions.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/yacc.prf \
    		../../../../Qt/5.2.1/mingw48_32/mkspecs/features/lex.prf \
    		../test/test.pro \
    		C:/Qt/5.2.1/mingw48_32/lib/Qt5Quick.prl \
    		C:/Qt/5.2.1/mingw48_32/lib/Qt5Qml.prl \
    		C:/Qt/5.2.1/mingw48_32/lib/Qt5Network.prl \
    		C:/Qt/5.2.1/mingw48_32/lib/Qt5Gui.prl \
    		C:/Qt/5.2.1/mingw48_32/lib/Qt5Core.prl
    	$(QMAKE) -spec win32-g++ -o Makefile ..\test\test.pro
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\spec_pre.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\qdevice.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\device_config.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\common\shell-win32.conf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\qconfig.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_axbase.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_axbase_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_axcontainer.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_axcontainer_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_axserver.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_axserver_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_bluetooth.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_bluetooth_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_bootstrap_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_clucene_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_concurrent.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_concurrent_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_core.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_core_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_declarative.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_declarative_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_designer.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_designer_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_designercomponents_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_gui.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_gui_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_help.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_help_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_multimedia.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_multimedia_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_multimediawidgets.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_multimediawidgets_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_network.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_network_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_nfc.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_nfc_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_opengl.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_opengl_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_openglextensions.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_openglextensions_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_platformsupport_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_positioning.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_positioning_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_printsupport.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_printsupport_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_qml.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_qml_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_qmldevtools_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_qmltest.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_qmltest_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_qtmultimediaquicktools_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_quick.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_quick_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_quickparticles_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_script.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_script_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_scripttools.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_scripttools_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_sensors.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_sensors_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_serialport.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_serialport_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_sql.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_sql_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_svg.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_svg_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_testlib.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_testlib_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_uitools.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_uitools_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_webkit.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_webkit_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_webkitwidgets.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_webkitwidgets_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_widgets.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_widgets_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_winextras.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_winextras_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_xml.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_xml_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_xmlpatterns.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\modules\qt_lib_xmlpatterns_private.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\qt_functions.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\qt_config.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\win32-g++\qmake.conf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\spec_post.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\exclusive_builds.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\default_pre.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\win32\default_pre.prf:
    ..\test\deployment.pri:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\resolve_config.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\exclusive_builds_post.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\default_post.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\c++11.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\win32\rtti.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\warn_on.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\qt.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\resources.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\moc.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\win32\opengl.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\win32\windows.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\testcase_targets.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\exceptions.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\yacc.prf:
    ..\..\..\..\Qt\5.2.1\mingw48_32\mkspecs\features\lex.prf:
    ..\test\test.pro:
    C:/Qt/5.2.1/mingw48_32/lib/Qt5Quick.prl:
    C:/Qt/5.2.1/mingw48_32/lib/Qt5Qml.prl:
    C:/Qt/5.2.1/mingw48_32/lib/Qt5Network.prl:
    C:/Qt/5.2.1/mingw48_32/lib/Qt5Gui.prl:
    C:/Qt/5.2.1/mingw48_32/lib/Qt5Core.prl:
    qmake: FORCE
    	@$(QMAKE) -spec win32-g++ -o Makefile ..\test\test.pro
    
    qmake_all: FORCE
    
    make_first: release-make_first debug-make_first FORCE
    all: release-all debug-all FORCE
    clean: release-clean debug-clean FORCE
    distclean: release-distclean debug-distclean FORCE
    	-$(DEL_FILE) Makefile
    
    release-mocclean:
    	$(MAKE) -f $(MAKEFILE).Release mocclean
    debug-mocclean:
    	$(MAKE) -f $(MAKEFILE).Debug mocclean
    mocclean: release-mocclean debug-mocclean
    
    release-mocables:
    	$(MAKE) -f $(MAKEFILE).Release mocables
    debug-mocables:
    	$(MAKE) -f $(MAKEFILE).Debug mocables
    mocables: release-mocables debug-mocables
    
    check: first
    FORCE:
    
    $(MAKEFILE).Release: Makefile
    $(MAKEFILE).Debug: Makefile
    
    

  • Lifetime Qt Champion

    Hi,

    When starting the application from Qt Creator, hidapi.dll won't be found. One solution is to go in the Run section of the Project Panel. There edit the PATH environment variable and add the path to test/.



  • Thank you to help me.
    If I add path to test as bellow, it still not working.

    C:\Qt\5.2.1\mingw48_32\bin;C:\Qt\Tools\mingw48_32\bin;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Qt\5.2.1\mingw48_32\bin;C:\Users\MyName\Documents\test 
    

    And I don't understand why hidapi isn't found. I have on the .pro :

    INCLUDEPATH += $$PWD/
    DEPENDPATH += $$PWD/
    

    and I also add hidapi.dll on folder "build-test-Desktop_Qt_5_2_1_MinGW_32bit/release" next to .exe


  • Lifetime Qt Champion

    If you copy that dll in the build folder, does it still fail to start ?



  • Yes, if I copy .dll next to .exe, it still not working


  • Lifetime Qt Champion

    Just to be sure we are on the same line:

    1. You build your application
    2. You copy the DLL in the build folder
    3. You call run from Qt Creator
    4. Crash ?


  • Yes.
    On the other side, if I copy .exe on folder with hidapi.dll and other dll of Qt (as I deploy). I can execute the application without crash.


  • Lifetime Qt Champion

    Strangeā€¦ Does hidapi.dll have any dependency ?



  • no, I don't think.
    And when I copy .dll on "deploy folder" I don't added anything except hidapi.dll and Qt dll



  • I found the problem. The difference between "deploy" folder and project folder is : msvcr120d.dll. If I add this dll on project folder, it works.
    Thank you for your help


  • Moderators

    @helenebro
    actually the msvc runtime binaries should also be available system wide (e.g. contained in the PATH), so something went wrong during installation. Or do you have altered the environment variables in the QtCreator project settings?



  • I don't know if it's a installation problem but I don't found msvrc120d.dll on C:/Windows/System32 or on C:/Windows/SysWOW64.



  • Hi, msvcr120dl.dll usually you will only obtain by installing Microsoft Visual Studio 2013. Because it's the debug flavor of the normal msvcr120.dll, and that dll is much more easy to find.
    Try building your app in Release mode, then you might get rid of your dependency on msvcr120d.dll.



  • If I build my app in Release mode I have the problem if msvcr120d.dll on my folder. I think it's because library hidapi is build with visual studio.


Log in to reply
 

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