[solved] Microsoft Visual C++ Runtime Library says error
Giorgi last edited by Giorgi
On widnows I compiled Release version of my Gui application and now I have someapp.exe file. i want to move it in another directory or in another computer. I added requested dlls but still I have runtime error:
Microsoft Visual C++ Runtime Library says:
the application has requested the runtime to terminate it in an unusual way. please contact the application's support team for more information.
How to run? any ideas?
mcosta last edited by
I added requested dlls but still I have runtime error:
have you checked (for instance with DependencyWalker) if there're still missing libraries?
koahnig last edited by
to add @mcosta 's repsonse
Implicitly one can read that you have tested and started your release application from your IDE (e.g. Qt creator). If not, you should do. In Qt creator you can start your app and it will/shall find the required dlls. If you have a crash already there, then you do not have dll problem, but a general coding problem.
Also you have to pay attention from where you are taking the dlls. Depending on Qt creator version and Qt lib version the dlls are not always compatible. Make sure that you are using the Qt lib dll and not the ones used by Qt creator.
@mcosta no but in DependencyWalker I got following error:
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
@koahnig My Qt version is 5. yes it works from QT Creator. Then I moved **.exe ** file from release directory into C:\tests\ and copied requred dlls from qt installation directory\bin\ into C:\tests\. before it couldn't started but after I copied required libraries it started but with runtime error.
mcosta last edited by
Something to check is if you have some dependencies with plugins.
Read here how to handle properly the deployment of DLLs and plugins
@mcosta great link. I will check
SysTech last edited by
I could be wrong but a problem like mentioned with CPU types could mean you are copying the wrong DLLs. It was confusing to me at first but there are duplicate (or rather similarly named) DLLs that service the Qt Creator and in my first attempt I was copying those rather than the ones from the compiler directory.
The other thing is you'll likely need the platforms directory and at minimum the windows platform support.
Basically for even a fairly simple program you need a lot of DLLs. My best advice is to use a product like VMWare Workstation or VirtualBox. Install a clean simple copy of the OS you plan to target. Move your application to this VM and work on adding DLLs, platforms, and plugins until it runs. When you can get it to run you've got what you need and you can zip that stuff up or create an installer from it.
I'm using the MS Visual C++ compiler (2013) and to get my app to run on a fresh install I needed some DLLS from the compiler as well.
SysTech last edited by SysTech
Glad to hear it is solved. @mcosta has helped many people including myself. Don't forget to mark your post as solved!
@SysTech how mark my post as solved? I am new here and I don't know the rules... how Add [SOLVED] prefix to the thread title?
If you don't have the option in the Topic Tools menu, just edit the thread title and prepend [solved]
@SGaist ok. thanks