Cannot run program after deployment
-
I wrote a program in Linux then I copied files to Windows Qt environment. I compiled program in Release mode from Qt Creator itself and it worked well.
Then I copied its executable to a folder. Copied all DLLs and deleted while program is running. Now I got DLLs I need.
Again tested, my program is working well. Now changed name of Qt directory on my system. It does not work. Gives me this error:
This application failed to start because no Qt platform plugin could be initialized.
Now created a folder there and named "platforms". Copied everything inside platforms of mingw plugins.
Now my program does not give that error but it does not start either.
I am using Qt 5.11.2 with default minGW compiler. I used "quick, sql, quickcontrols2" modules (These are included in my .pro file)
-
-
@raven-worx Yes, I have already read that but I saw like this in tutorials that I found in internet. Probably they are outdated since Qt is evolving.
Finally I decided to do it like in official instructions. First I tried to use windeployqt tool on executable created by QtCreator, but it didn't work.
Then I used these commands on folder where PRO file exists:
qmake -config release qmake project.pro mingw32-make windeployqt Project.exe
And it works.
But I have a question. There are folders like translations etc. I didn't configure something for translations but they are still there. I think they are useless. I opened program and tried to delete everything while running. Some of them are deleted, at the end size of folder became around 40 mb from 70 mbs.
Does this cause problems later? Because I am not sure about how it works.
-
@maydin said in Cannot run program after deployment:
Does this cause problems later? Because I am not sure about how it works.
hard to say, without knowing what features you really use in your application.
If you don't use translations, you dont need them of course