-2

I build a project, which works absolutely fine when I execute inside Qt. But when I execute it using .exe file in release folder of the project, it gives me junk of errors.

This is the screenshot of the error:

screenshot

I already added all DLLs in the folder and plugin folder.

halfer
  • 19,824
  • 17
  • 99
  • 186
  • 2
    There are probably Qt .dll files which are available when you run within Qt, but which aren't naturally available when you run the .exe standalone. You should identify these .dlls (I don't know their names) and copy them into the folder with your .exe. (There are other methods.) – Jack Deeth Dec 14 '16 at 16:35
  • Possible duplicate of [Qt Error : Procedure Entry Not Found](http://stackoverflow.com/questions/40744629/qt-error-procedure-entry-not-found) – Dusteh Dec 14 '16 at 17:03
  • 1
    Your image of text [isn't very helpful](//meta.unix.stackexchange.com/q/4086). It can't be read aloud or copied into an editor, and it doesn't index very well, meaning that other users with the same problem are less likely to find the answer here. Please [edit] your post to incorporate the relevant text directly (preferably using copy+paste to avoid transcription errors). – Toby Speight Dec 14 '16 at 17:11
  • The search term you're looking for is "deployment." – MrEricSir Dec 14 '16 at 19:00

4 Answers4

0

The dlls are missing from your path. Either add the proper dir to environment variables or copy to the missing dlls to the .exe destination.

You can check Qt Error : Procedure Entry Not Found for details on how to set the environment variable to fix the problem.

Community
  • 1
  • 1
Dusteh
  • 1,496
  • 16
  • 21
0

You should deploy the application, if you want to run it outside Qt Creator (or Qt command prompt). This means, put the .exe and all the libraries it needs in the same folder (that way you don't have to edit your system PATH, which is another way to allow it to find the .DLL files, but which will easily lead to so called .DLL hell, and you don't want to go there).

To properly deploy a Qt app on Windows, read this document page. In particular, you will want to use windeployqt tool.

hyde
  • 60,639
  • 21
  • 115
  • 176
0

The Qt Creator adds required PATH environments to your session, PATH variable is used for finding dll and executable files, the problem is Qt Creator only modifies the environment variables for session it owns not globaly. You can see Qt Creator's own environment variables in run settings tab :

Run settings tab - Qt Creator

find PATH environment variable and make sure all comma (;) separated paths are in system PATH environment variable, or you can replace PATH variable generated by Qt with system PATH environment variable.

e.jahandar
  • 1,715
  • 12
  • 30
0

You are probably making a mistake in the version of the copied dll. If you compiled you application with Qt 5.6 then get the dll from Qt5.6 installation directory and compiler. Also make sure that you do not get them from QtCreator directory.

gjergj
  • 11
  • 2