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. QtCored4.dll was not found
Qt 6.11 is out! See what's new in the release blog

QtCored4.dll was not found

Scheduled Pinned Locked Moved General and Desktop
9 Posts 7 Posters 11.7k 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.
  • C Offline
    C Offline
    cyao
    wrote on last edited by
    #1

    I can compile and run a project in Qt Creator, but when I run the executable in Windows, i.e., try to execute the program by double clicking the exe file, an error message box is popped up, saying "This application has failed to start because QtCored4.dll was not found. Re-installing the application my fix this problem." I searched QtCored4.dll on my computer, and it could not be found. Could any one tell me what's wrong? Thanks a lot!

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goblincoding
      wrote on last edited by
      #2

      If it happens on the same machine that you develop on, then you need to look at your library paths. If not, then I suggest looking into Dependency Walker to help you determine all the dll dependencies of your application so that you can deploy them together. Have a look at this page "Qt Deployment":http://doc-snapshot.qt-project.org/4.8/deployment.html for a better explanation of what is required.

      http://www.goblincoding.com

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sam
        wrote on last edited by
        #3

        Check where you have installed Qt and the version that you are using . I found the file in
        C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\bin . You need to copy the .dll files to the same folder where you have the executable file. For other missing dlls you can look up with Dependency Walker as specified in the above post.

        1 Reply Last reply
        0
        • G Offline
          G Offline
          giesbert
          wrote on last edited by
          #4

          Take care that you are starting the debug version. Do not instalöl debug versions on other then developement machines, the libraries and executables are much bigger then the release ones.

          Nokia Certified Qt Specialist.
          Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

          1 Reply Last reply
          0
          • C Offline
            C Offline
            cyao
            wrote on last edited by
            #5

            Thanks all who replied to my question. According to Sam, I guess the problem is due to my Qt installation. I installed Qt 4.8.1 MinGW on my PC running Windows XP, and C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\bin folder does not exist on my PC though folder C:\QtSDK\Desktop\Qt does exist. But I cannot understand why the program can run in Qt Creator? It looks that it does not use QtCored4.dll when the program runs in Qt Creator. Any insight into this?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              kbigdelysh
              wrote on last edited by
              #6

              I got the same error message:


              The program can't start because QtCored4.dll is missing from your computer. Try reinstalling the program to fix this problem.

              OK

              How to resolve it:

              Search for that file in your hard disk (it should be located in your bin directory of Qt folder) then add the path to the bin directory (e.g C:\Qt\4.8.5\bin) to your PATH variable and restart Visual Studio.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                ambershark
                wrote on last edited by
                #7

                It's because in Qt creator it has access to the Qt path stuff. It's development environment vs distribution problem.

                Basically you will need to copy all the dlls that your application uses to the app's directory.

                This includes all the Qt dlls, and the mingw dlls that it needs. It will also need the platform dlls in a specific directory and any plugins you may rely on in your application.

                Here is a "doc":http://qt-project.org/doc/qt-5/windows-deployment.html on deploying Qt5 applications. This is basically what you need to do to run the app outside a development environment.

                Using a dependency walker like "this":http://www.dependencywalker.com/ will let you locate which DLLs your app needs.

                You can bypass the deployment stuff if you add the paths to your DLLs to your system path. I think this is a very bad idea though as when you go to deploy you have a good chance of messing up your package and it won't work on non-developers computers. Also if you do this you could potentially build against one version of Qt and use the DLLs of a different one.

                Here is an example of a mingw deployment directory:

                @
                app.exe
                platforms/qminimal.dll
                platforms/qwindows.dll
                Qt5Core.dll
                Qt5Gui.dll
                Qt5Network.dll
                Qt5Widgets.dll
                libstdc++-6.dll
                libgcc_s_sjlj-1.dll
                @

                Note that yours will not be the same dlls, especially the mingw ones. They will be specific to your build environment. You can find the names with dependency walker or just by running the program, fixing what it complains about, then rerunning until it works.

                You can find the mingw dlls in the mingw compiler's directory, and qt dlls in the qt install lib directory.

                My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                1 Reply Last reply
                0
                • JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #8

                  [quote author="ambershark" date="1405730250"]Note that yours will not be the same dlls, especially the mingw ones. They will be specific to your build environment.[/quote]...and Qt version :) (all the previous posters asked about Qt 4, which doesn't need the platforms DLLs)

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    ambershark
                    wrote on last edited by
                    #9

                    Oops, good point. I'm so used to deploying Qt5 these days I don't even remember Qt4 or 3 anymore, lol.

                    My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                    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