qtcreator - exe does work fine inside qtcreator but doesn't outside

后端 未结 4 1212
梦毁少年i
梦毁少年i 2020-12-16 07:54

I want to give a friend of mine a release build of a little project. It works perfectly fine when started from inside qtcreator, but doesn\'t open when double-clicked on the

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-16 08:40

    Since you are talking about Qt5, make sure you have a platforms directory with at least qminimal.dll in it location in the directory of your program.exe file. They are part of the new changes made to Qt. (Possibly qwindows.dll as well).

    Additionally, make sure you include the appropriate msvcr*.dll dlls if you do no compile with it statically linked. Check with dependency walker.

    /myProgram.exe 
    /Qt5Gui.dll
    /Qt5Core.dll
    / .... (other DLLs you require)
    /platforms/qminimal.dll
    /platforms/qwindows.dll (Not always required)
    

提交回复
热议问题