Executable files cannot run under vs2010 qt release

 

Problem: The executable file cannot be run under the vs2010 qt release, but the administrator can run it

 

The latest problems in using vs2010 to develop qt programs when releasing release programs, the following individuals make a summary and hope to help those in need.

Project development background:

The project environment uses vs2010, qt5.0.0, win8

Development goals:

The program runs normally through the vs2010 compiler in debug and release modes. Finally, the release version program (the dll files corresponding to qt are copied here, plus the plugins directory) needs to be copied to other computers to run.

 

The following problems encountered:

In the project corresponding to the release directory (D:\GitHub\zxjyu-pc\bin\Win32\Release)

 

 

 

Click to run the corresponding xxxx.exe and find that there is no response, but it can run normally by right-clicking and selecting administrator privileges. At this time, the consideration is whether the permissions have been set in the project and finally set the UAC execution level, but still can not Just click the program to run. The problem has been entangled for a day, and finally run in release mode through vs

 and use ProcessExplorer



 

To check the dependencies of the xxxx.exe file, through analysis, it is found that some qt dlls are directly used xxxx.dll under D:\GitHub\zxjyu-pc\bin\Win32\Release, qwindows.dll This dll reference address is my corresponding Under the directory where qt is installed, at this time, I directly copy the directory files in the plugins under the release directory to the release (imageformats and platforms exist in the plugins directory)

 

Then click on xxxx.exe to run it directly.

 

Final summary:

Here is because the exe file needs no permission to access local resources. It is best to check whether the corresponding dependencies of the exe file are in the current directory. If not, the operation will fail at this time. Finally, there are several tools for analyzing exe dependencies, ProcessExplorer and depends tools.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326604192&siteId=291194637