Qt cannot find dll, though everything is set

  • When I start my program it crashes (I made an earlier Post about a very simple program: http://stackoverflow.com/questions/34270960/programm-crashes-when-qtcpserver-is-called/34291322?noredirect=1#comment56326296_34291322)

    The problem

    Running the programm with GDB it immediately exits with the following messages:

      The GDB process terminated unexpectedly (exit code 0).


      During startup program exited with code 0xc0000135

    Which means a .dll is missing. Running the program outise of QtCreator, a message pops up that tells me QtNetwork4.dll is missing

    What I did to solve

    • The code is shown in the link mentioned above, as you can see there I've included QT += network to the the projects .pro-file.

    • Then I copied that missing .dll from the Qt-install directory directly to the same folder as the .exe of my program.

    • I also appended to my PATH the directory where the .dll is located in the QT-install dir.

    Still I'm getting the message that the QtNetwork4.dll is missing, and right now I'm running out of ideas. Somebody knows whats going on?

    Kind Regards

  • Hi. I don't know where you got this dll, but it might have some dependencies of its own. Check it with Dependency Walker too.

  • @QtExchange

    Hi and welcome to devnet

    you need to give more details of your environment. Especially the Qt version you are using, eventually also Qt creator.
    Where did you get the version from?

    The missing dll points towards Qt 4, which cannot be mixed with Qt 5 dlls.

  • Thanks for your quick replies:

    I'm working with:

    • Qt 4.8.1 (mingw)
    • Creator 3.4.0 (opensource)

    I took the (apparently in 4.8.1 missing) dll from a Qt 4.5.2

  • I'm sorry to bother you, was my mistake he was looking for QtNetwork4d.dll i missed the d thanks for your support

  • @QtExchange said:

    I took the (apparently in 4.8.1 missing) dll from a Qt 4.5.2

    Not sure what you mean here.

    Anyway, Qt 4 is still maintain, but Qt 5 is newer. If you are starting with Qt I would suggest starting with Qt 5.
    You can run different Qt lib version in parallel within the same Qt creator version. The only thing you need to be careful is not mixing the dlls of different versions.

Log in to reply