Methode connect() für einen Neustart-Button



  • Ja genau, das stimmt. Die Fehlermeldung:

    Die Anwendung konnte nicht korrekt gestartet werden (0xc000007b).
    Klicken Sie auf "OK", um die Anwendung zu schließen.

    War weil die Dateien nicht zum Build gepasst haben.
    Aber wenn ich dann die zum Build passenden Dateien nehme, fehlen:
    libgcc_s_dw2-1.dll
    Qt5Gui.dll
    libgcc_s_dw2-1.dll
    libstdc++-6.dll
    Qt5Guid.dll
    libwinpthread-1.dll

    Und nachdem ich die auch alle reinkopiert habe:

    Der Prozedureneinsprungpunkt
    "?dragLeaveEvent@QWidget@@MAEXPAVQDragLeaveEvent@@
    @Z" wurde in der DLL "E:\C++\Qt\108 Exe Datei portabel
    machen\build-qtguiapplication2-Desktop_Qt_5_13_0_MSVC2017_
    32bit2-Debug\debug\qtguiapplication2.exe" nicht gefunden.



  • @theAnfänger77 sagte in Methode connect() für einen Neustart-Button:

    MSVC2017

    @theAnfänger77 sagte in Methode connect() für einen Neustart-Button:

    libstdc++-6.dll

    Sag mal, mit was Compilierst Du?
    Und woher hast Du die Qt DLLs?



  • Ich kompiliere mit Qt Creator 4.9.1 (Community) und die Qt dlls nehme ich aus dem Installationsverzeichnis von Qt Creator 4.9.1 (Community).



  • @theAnfänger77 sagte in Methode connect() für einen Neustart-Button:

    Ich kompiliere mit Qt Creator 4.9.1 (Community)

    Das ist kein Compiler.

    Tools ~> Options ~> Kits ~> Compilers ... was steht da?



  • Desktop Qt 5.13.0 MSVC2017 32bit2



  • @theAnfänger77 sagte in Methode connect() für einen Neustart-Button:

    Desktop Qt 5.13.0 MSVC2017 32bit2

    Das ist auch kein Compiler, aber egal jetzt.

    Du findest die passenden DLLs in C:\Qt\5.13.0\msvc2017\bin wenn Du Qt mit Standarteinstellungen installiert hast.



  • Aber statt von Hand die DLLs zu kopieren, nutze windeployqt: Qt for Windows - Deployment



  • Vielen Vielen Dank!🙂
    Jetzt geht es!
    Ich habe schon so vieles versucht um dieses Problem zu lösen.
    Alle möglichen Builds, alle möglichen Dateien, ...
    Aber jetzt ist es gelöst!
    👍



  • @Th69 Nice!

    C:\Qt\5.13.0\msvc2017\bin>qtenv2
    Setting up environment for Qt usage...
    Remember to call vcvarsall.bat to complete environment setup!
    
    C:\Qt\5.13.0\msvc2017\bin>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
    **********************************************************************
    ** Visual Studio 2019 Developer Command Prompt v16.2.1
    ** Copyright (c) 2019 Microsoft Corporation
    **********************************************************************
    [vcvarsall.bat] Environment initialized for: 'x86'
    
    C:\Qt\5.13.0\msvc2017\bin>windeployqt.exe --no-compiler-runtime C:\Users\Swordfish\source\repos\QtGuiApplication2\Win32\Debug
    C:\Users\Swordfish\source\repos\QtGuiApplication2\Win32\Debug\QtGuiApplication2.exe 32 bit, debug executable
    Adding Qt5Svg for qsvgicond.dll
    Direct dependencies: Qt5Core Qt5Widgets
    All dependencies   : Qt5Core Qt5Gui Qt5Widgets
    To be deployed     : Qt5Core Qt5Gui Qt5Svg Qt5Widgets
    Updating Qt5Cored.dll.
    Updating Qt5Guid.dll.
    Updating Qt5Svgd.dll.
    Updating Qt5Widgetsd.dll.
    Updating libGLESV2d.dll.
    Updating libEGLd.dll.
    Updating d3dcompiler_47.dll.
    Updating opengl32sw.dll.
    Patching Qt5Cored.dll...
    Creating directory C:/Users/Swordfish/source/repos/QtGuiApplication2/Win32/Debug/iconengines.
    Updating qsvgicond.dll.
    Creating directory C:/Users/Swordfish/source/repos/QtGuiApplication2/Win32/Debug/imageformats.
    Updating qgifd.dll.
    Updating qicnsd.dll.
    Updating qicod.dll.
    Updating qjpegd.dll.
    Updating qsvgd.dll.
    Updating qtgad.dll.
    Updating qtiffd.dll.
    Updating qwbmpd.dll.
    Updating qwebpd.dll.
    Creating directory C:/Users/Swordfish/source/repos/QtGuiApplication2/Win32/Debug/platforms.
    Updating qwindowsd.dll.
    Creating directory C:/Users/Swordfish/source/repos/QtGuiApplication2/Win32/Debug/styles.
    Updating qwindowsvistastyled.dll.
    Creating C:\Users\Swordfish\source\repos\QtGuiApplication2\Win32\Debug\translations...
    Creating qt_ar.qm...
    Creating qt_bg.qm...
    Creating qt_ca.qm...
    Creating qt_cs.qm...
    Creating qt_da.qm...
    Creating qt_de.qm...
    Creating qt_en.qm...
    Creating qt_es.qm...
    Creating qt_fi.qm...
    Creating qt_fr.qm...
    Creating qt_gd.qm...
    Creating qt_he.qm...
    Creating qt_hu.qm...
    Creating qt_it.qm...
    Creating qt_ja.qm...
    Creating qt_ko.qm...
    Creating qt_lv.qm...
    Creating qt_pl.qm...
    Creating qt_ru.qm...
    Creating qt_sk.qm...
    Creating qt_uk.qm...
    Creating qt_zh_TW.qm...
    
    C:\Qt\5.13.0\msvc2017\bin>
    

    Die ganzen translations muss man aber nicht zwingend alle mitgeben!? O.O



  • Sorry @Swordfish, ich hatte es nicht als Frage an mich aufgefasst.
    Ich denke, die Übersetzungsdateien müssen je nach Anwendung mit ausgeliefert werden (wenn man mehrere Sprachen unterstützen will). In Qt Linguist Manual: Developers unter dem Abschnitt "Deploying Translations" steht noch näheres dazu.

    Dieses sind ja die Standard-Qt Translations, aber für eigene Übersetzungen kann man dafür auch die Ressourcen benutzen (und diese auch daraus laden lassen): s. akzeptierte Antwort in loading qm file using QTranslator.


Anmelden zum Antworten