0

I am trying to build an QT application with version 5.4. and when ever I am trying to run the exe on a different machine where QT is not installed I am getting below error "The program cannot start because QT5core.dll is missing from your computer, Try reinstalling the program to fix this problem". and when I copied QT5core.dll with the exe in a machine where QT is not installed its working fine.

Is there any way that I can link QT5core.dll with the exe statically so that whatever place I run this exe it should not ask for any dll.

Thanks, Tushar

  • possible duplicate of [Qt static linking and deployment](http://stackoverflow.com/questions/1011197/qt-static-linking-and-deployment) – MrEricSir Jul 06 '15 at 20:43

1 Answers1

1

You can build a standalone version of your Qt application so that it doesn't have any library dependencies at runtime. Be warned though: this can greatly expand the size of the .exe generated and the compilation time. Have a look here:

https://wiki.qt.io/Build_Standalone_Qt_Application_for_Windows

and here:

https://wiki.qt.io/How_to_build_a_static_Qt_version_for_Windows_with_gcc

Bizkit
  • 384
  • 1
  • 10