Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. [Resolved] Qt 5.0.0 Building projects, *.exe always ask for Qt5Cored.dll and other components when launching
Forum Updated to NodeBB v4.3 + New Features

[Resolved] Qt 5.0.0 Building projects, *.exe always ask for Qt5Cored.dll and other components when launching

Scheduled Pinned Locked Moved Installation and Deployment
17 Posts 9 Posters 15.3k Views 2 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.
  • W Offline
    W Offline
    Wilk
    wrote on last edited by
    #4

    [quote author="AxDSan" date="1357067470"]I tried adding that path (my working path: C:\Qt\Qt5.0.0\5.0.0\msvc2010\bin) into System Variables (Environment)[/quote]
    What actually did you do?

    [quote author="AxDSan" date="1357067470"]How could I do so?[/quote]
    You should:

    Go to Start menu -> Programs -> Standard -> Run

    Type systempropertiesadvanced and press Enter

    Press Environment variables button (or something like this, I don't have English version of Windows)

    Press Create or Add button.

    Create new variable with name QTDIR and value C:\Qt\Qt5.0.0\5.0.0\msvc2010\

    Find PATH variable, choose it and press Edit button.

    Add @;%QTDIR%/bin@ at the end of the edit line (don't delete the value you already have there).

    Press OK everywhere.

    Now everything should work. If it doesn't, check, if there are libraries with suffix "d" in C:\Qt\Qt5.0.0\5.0.0\msvc2010\bin. If not, then just find them in your Qt dir and add the dir, that contains them in your PATH with instructions, provided above. Just give another name to variable, for example, QTDIR_DEBUG.

    EDIT:
    I've made a mistake in what you should add in the end of PATH variable.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AxDSan
      wrote on last edited by
      #5

      Thanks Both @itviewer & @Wilk Both Answers were pleasant with full of information.

      I followed both instructions and did well...

      Now I tweaked settings by my own as well, If someone happens to be struggling with the same problem let me add I'm working on Windows 7-64x what I did was very simple...

      Add the following lines into System Environment PATH Variable just like @Wilk stated:

      • Created a New System Variable with Variable NAME QTDIR and with Variable VALUE:
        C:\Qt\Qt5.0.0\5.0.0\msvc2010\

      • Edited Default PATH System Environment Variable and added the following at the end of the line:
        ;QTDIR\bin;C:\Qt\Qt5.0.0\5.0.0\msvc2010\bin;C:\Qt\Qt5.0.0\5.0.0\msvc2010\lib

      Notice the last two objects in bold were added manually by me.. I think this is what resolved the whole situation down here.

      This last tweaks completely resolved my problem.

      Thanks both for sharing information and kindly helping me! Blessings to both of you.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        Wilk
        wrote on last edited by
        #6

        Shame upon me. I've found out that I've made a little mistake (I've edited the original post). Sorry me please.
        Also, the objects you've added:

        the first object (C:\Qt\Qt5.0.0\5.0.0\msvc2010\bin) is the same as @%QTDIR%/bin@

        the second object (C:\Qt\Qt5.0.0\5.0.0\msvc2010\lib) is the same as @%QTDIR%/lib@

        1 Reply Last reply
        0
        • G Offline
          G Offline
          Geometrian
          wrote on last edited by
          #7

          Hey,

          I have exactly the same problem. However, I don't want to resolve it by using dlls. Is it possible to instead statically link everything so that all dependencies are linked in to begin with?

          Thanks,

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AxDSan
            wrote on last edited by
            #8

            [quote author="Geometrian" date="1357497246"]Hey,

            I have exactly the same problem. However, I don't want to resolve it by using dlls. Is it possible to instead statically link everything so that all dependencies are linked in to begin with?

            Thanks,[/quote]

            Hello there! Geometrian,

            Indeed I happened to be in the same tracks as you could see, and yes you can build Qt statically so you can embed those libraries in the executable so when you deploy your exe you just need to give the standalone executable, So yeah you can find more information on how Static Compile Qt "here":http://www.qtcentre.org/wiki/index.php?title=Building_static_Qt_on_Windows

            As the steps requires you first need to have your mkspecs configured.. like so describes "here":http://www.qtcentre.org/wiki/index.php?title=Building_static_Qt_on_Windows_with_MinGW

            After that keep following instructions on the first link I sent you. Hope you find it useful.

            Special Note: Another good source of Static Building Qt is "This Source":http://qt-project.org/wiki/How_to_build_a_static_Qt_version_for_Windows_with_gcc but the only thing is that it uses MinGW with GCC 4.4

            1 Reply Last reply
            0
            • G Offline
              G Offline
              Geometrian
              wrote on last edited by
              #9

              [quote author="AxDSan" date="1357498338"]Indeed I happened to be in the same tracks as you could see, and yes you can build Qt statically so you can embed those libraries in the executable so when you deploy your exe you just need to give the standalone executable, So yeah you can find more information on how Static Compile Qt "here":http://www.qtcentre.org/wiki/index.php?title=Building_static_Qt_on_Windows[/quote]I followed the directions here, and after some modifications, I was able to get the thing built in static mode. There are some problems using it, but I think that's left for another thread.

              For people of the future, my complete documentation on making a successful build for both x86 and x86-64 with or without static compilation may be found "here":http://www.geometrian.com/programming/tutorials/setup_Qt.txt.

              Thanks!

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mickey
                wrote on last edited by
                #10

                Thanx Wilk. I have also faced this problem and solved by your solution.

                1 Reply Last reply
                0
                • I Offline
                  I Offline
                  imhashir
                  wrote on last edited by
                  #11

                  I understand the solution of problem. (I am facing it too) but if this is the solution then it means all apps that we create from Qt can only be run on PCs with this modification. Let say, if I build an app and want to give it to my friends so that thy can also enjoy or I upload it to internet so others can use my app then they wont be able to do so due to this error. Then it will not be for public use. Isn't there any other solution of this prob?

                  1 Reply Last reply
                  0
                  • I Offline
                    I Offline
                    imhashir
                    wrote on last edited by
                    #12

                    I understand the solution of problem. (I am facing it too) but if this is the solution then it means all apps that we create from Qt can only be run on PCs with this modification. Let say, if I build an app and want to give it to my friends so that thy can also enjoy or I upload it to internet so others can use my app then they wont be able to do so due to this error. Then it will not be for public use. Isn't there any other solution of this prob?

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      sunil.nair
                      wrote on last edited by
                      #13

                      Hi,

                      Thanks for your answers but all your solution concern the issue when the compiler is msvc. I am using a minGW compiler and I am facing the error
                      "can't find qt5Cored.dll."

                      What should I do now?

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        sunil.nair
                        wrote on last edited by
                        #14

                        Hi,

                        Thanks for your answers but all your solution concern the issue when the compiler is msvc. I am using a minGW compiler and I am facing the error
                        "can't find qt5Cored.dll."

                        What should I do now?

                        1 Reply Last reply
                        0
                        • E Offline
                          E Offline
                          euchkatzl
                          wrote on last edited by
                          #15

                          You don't have to add qt install dir to your environment variable !
                          The only thing you have to do is to copy all the necessary dlls into your build dir.

                          Look at this thread :
                          https://qt-project.org/forums/viewthread/52630/

                          I've explained what to do.

                          1 Reply Last reply
                          0
                          • E Offline
                            E Offline
                            euchkatzl
                            wrote on last edited by
                            #16

                            You don't have to add qt install dir to your environment variable !
                            The only thing you have to do is to copy all the necessary dlls into your build dir.

                            Look at this thread :
                            https://qt-project.org/forums/viewthread/52630/

                            I've explained what to do.

                            1 Reply Last reply
                            0
                            • A Offline
                              A Offline
                              aabc
                              wrote on last edited by
                              #17

                              And what if I don't want to copy all the dlls ?
                              Is there another way to specify the dll location only to my program ?

                              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