Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A program is running fine in the compiler.But when I open the debugged .exe file it shows an error.

A program is running fine in the compiler.But when I open the debugged .exe file it shows an error.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asunaki
    wrote on last edited by
    #1

    May be you guys have replied to this kind of problem before.But just to be sure:do I need to copy those .dll files to the same folder as the .exe file for each new program to make it run properly?I guess the answer would be yes.Now is there a way to find out at once which .dll files do I need to copy ?I am assuming that I need different .dll files for different programs.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Indeed, this question has already been asked numerous times and still is. A quick search through the forum would have pointed you to the "Windows deployment guide":http://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html

      Watch out specifically for the folder layout of the plugins and platform plugins

      Happy deployment !

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vezprog
        wrote on last edited by
        #3

        If you are in the debugger and are running your program, the environment variables for your system are already set by default for your instance of the creator.

        If you go into your Qt install folder, you will see the bin and libs folder than contains all of the dll's. Most Qt debug dlls end with a 'd', like QtGuid.dll. What ever Qt modules you included in your .pro file should be present to the executable...so if:

        QT += widgets
        QT += core
        QT += network

        I would need:
        Qt5Widgets.dll
        Qt5Core.dll
        Qt5Network.dll

        Or, you could add to your PATH environment variable the location of the Qt libraries (if your deploying on another system, you most likely want to ship the dlls with the exectuable).

        Also, you have the option for static linking (everything built into the executable), or dynamic linking, depending on the license you have.

        Take a look at this "link":http://qt-project.org/doc/qt-5.0/qtdoc/deployment.html.

        Also, "dependency walker":http://www.dependencywalker.com/ is a great tool to figure out what are not present to your executable if it is unable to run (Qt5 has a bunch of other non Qt labeled dll's that are in the bin folder that are required for some windows systems).

        Edit: Plus what he said above :)

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved