Why is my QT application not working?

I built a Qt 5 application using Qt Creator on a 64-bit version of Windows 7 (using msvc 2010). The application works fine on my computer, but it will not work on other computers.

I copied all the DLL files that were shown as missing in the Dependency Walker in the program folder, and there is no error, but the application simply will not work.

I tested it on Windows XP and Windows 7 64 and 32 bit.

What can I do to find out what is wrong?

UPDATE: I installed Qt 4.8.4 (vs 2008) and msvc 2008 express, and I compiled it and it runs on other computers with .dlls Qt4. maybe someone knows what the problem is with Qt5 ...

+4
source share
4 answers

I had the same problem.

You need to include the "platform" directory containing qwindows.dll and qminimal.dll in your executable directory. You can find the directory in the plugins folder.

If you do not add this, your application will be downloaded and then exit with a return code of 0. The dependency walker will not help you because the DLLs are loaded with a delay.

+4
source

I had the same problem: I added all the DLL files that Dependency Walker described, but my program immediately exited without an error message at startup.

I added libEGL.dll to the program directory and now it works fine.

I assume that libEGL.dll dynamically loaded by one of the other DLLs - perhaps libGLESv2.dll , based on the fact that of all the known dependencies it has the most similar name (!) - and that dynamic loading is not something that Dependency Walker can detect .

+3
source

I had the same problem and found out that MinGW GCC 4.7 is not compatible with Qt 5.0 and above from this this post . I used the same approach as you, and switched to Qt Creator 4.8, which worked.

0
source

I also had the same problem, and I tried with both the missing DLL messages and the Dependency Walker, and this did not help me, or I do not know if I used it correctly. The method below helped me solve (for this scenario) . This method will work in some minimal cases.

Scenario

  • QT Creator 3.3.2
  • QT 5.4.1 (MSVC 2010, 32 bit), Windows 8.1
  • Not using dynamic dll loading
  • Use third-party dll
  • This is a QTWidget application.

Method (tried for both sets MinGW 32 bit and MSVC2012 OpenGL 32 bit)

  • Get the exe release after creating the application. Copy and paste into another folder where we want (suppose Z: \ abc)
  • Go to the installed Qt kit folder (MinGW or MSVC) (in my case: Z: \ Qt \ 5.4 \ mingw491_32 (or) Z: \ Qt \ 5.4 \ msvc2012_opengl)
  • Search * .dll
  • Copy the entire DLL and paste it into the exe folder. This is (z: \ abc)
  • Launch the application (in my case, it started correctly).
  • At application startup, delete all copied DLL files.

    6.1). When you remove the window will display a query for the DLL files that are used by the application (File is used) , since these libraries were loaded initially. Leave these files as they are.

    6.2) And other DLL files will be deleted upon request.

  • Close the application and open it (in my case, it started correctly).
  • So, we got the necessary DLL files

This is not the right way, but in some cases it may help.

Note

When copying all DLLs, when you receive a message with an existing file, store both files in different names as the system makes a decision. If the application does not start, we can try with these renamed files.

0
source

All Articles