2

I use Qt 5.0.1 and Qt Creator 2.6.2 in W7. I tried to run a simple app from examples which contains only a window ("Widgets tutorial - creating a window"). When I run it in Qt Creator, it works. But when I run it as a standalone app (Release), it doesn't. I filled the folder with every dll it had asked (26 MB of dlls, while the app is 10KB!!!). Now it doesn't ask for any files, it just doesn't run at all with no explanations.

I tried to add some files as it is advised in Application deployed with QT5 libraries does not start on Windows 7 but no luck. In HelloWorld Deployment with QtQuick 2.0 in Windows 7 and XP there are no problems in w7.

Community
  • 1
  • 1
NuPagadi
  • 1,410
  • 1
  • 11
  • 31
  • I thought that it was because I used non English letters in destination path. But I corrected that and it still doesn't run. – NuPagadi Mar 22 '13 at 08:09

2 Answers2

2

May be this a dependency problem, These links describes it:

Qt 5.0 program runs in QtCreator but not outside

How to build QTcore4.dll without dependency to MSVCx80.dll?

Community
  • 1
  • 1
Reza Ebrahimi
  • 3,623
  • 2
  • 27
  • 41
  • Thanks for your answer, but it hasn't helped. Using Dependency Walker I added some new files to the app folder and to system32. Then adding one of files (ieframe.dll) didn't relieve the warning, so I found out the IE update should have helped. It helped with that file, but there were very many new required dlls. I was adding them for a while, then I decided to try Qt 4.8, cause there was too much of them. – NuPagadi Mar 22 '13 at 18:26
  • Maybe it's just a bug. Even on my own PC there are so many problems with simple window, so I can't give any credence to it at clients PCs. Also debug build works correctly. – NuPagadi Mar 22 '13 at 18:32
  • 1
    be care of adding correct version of Qt DLL files, for release build they not have 'd' letter in their names, so my suggestion is to uninstall your compiler facilities (may VS 2010) and then install it again, may be a mismatch in dll files has been occured. – Reza Ebrahimi Mar 23 '13 at 09:55
  • Yes, debug build was run with proper dlls. And actually I've already reinstalled VS, Qt and winSDK about three times=) (Even reboot didn't help). Have you tried to run on your own that particular example I mentioned? Was it ok? – NuPagadi Mar 23 '13 at 10:55
  • I have Qt 4.8, 5.0.0 and 5.0.1 kits as shared and Qt 4.7 as static build of Qt installed on my system and all works fine without any problem, but I have a question, first one is your Windows SDK compiler version and your VStudio verion, I think both compiler versions is not match, see my previous answers and its comments in this link: http://stackoverflow.com/questions/14464075/qt-creator-how-to-add-a-compiler/14483175#14483175 – Reza Ebrahimi Mar 23 '13 at 11:15
  • SDK for w8. I've tried to install w7 SDK, but the instalation failed many times. Anyway, IMHO it's not the reason, because I installed it just for the debugger, which I didn't use in making build. I use MSVC 2010, so my compiler is Visual C++ 10.0. Also I chosen only x32 versions, cause my system is x32. BTW, for instance, calculator example worked correctly. – NuPagadi Mar 23 '13 at 11:58
  • http://msdn.microsoft.com/en-US/windows/hardware/hh852363 this one. I downloaded it directly from the site. – NuPagadi Mar 23 '13 at 12:00
  • this is a test: remove all of compiler output directory for release build and try again. – Reza Ebrahimi Mar 23 '13 at 12:22
  • 1
    and if it was not work, I think you should remove SDK and allow only VS 2010 stays on your system or try MinGW version of Qt so for this you must install MinGW first. – Reza Ebrahimi Mar 23 '13 at 12:25
  • 1
    All the time I tested it in separate directory. And I installed just debugger tools from SDK several times and full SDK once. Thanks a lot for your help. I've already uninstalled Qt5. It shouldn't have been that hard to handle, I believe. I tried Qt4 add-in with MSVS and I managed to start this fu... single window, even without pro file (Mb it was the reason, but I didn't change it myself). And I don't need nearly 20 dlls anymore. Now just 2 of them is ok. – NuPagadi Mar 23 '13 at 13:23
1

platforms/qwindows.dll is a "non-required" required DLL to run Qt5 apps. Build your app in Release mode and steal the DLL from Qt Creator's folder (or find it into Qt's bin/platforms folder)

Петър Петров
  • 1,966
  • 1
  • 17
  • 14