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. How the hell did QtTest4.dll enter the game?
Qt 6.11 is out! See what's new in the release blog

How the hell did QtTest4.dll enter the game?

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 978 Views 3 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.
  • B Offline
    B Offline
    Bart_Vandewoestyne
    wrote on last edited by
    #1

    I am trying to figure out why the release build of one of our applications has a dependency on QtTest4.dll. Our setup is as follows: we use our own (Visual C++ 2012) build of Qt 4.8.7. We haven an application, let's call it App.exe, that among others loads DLLs using QLibrary::load().

    When I investigate App.exe with Dependency Walker [1], I cannot see QtTest4.dll among the module dependencies. However, when I run App.exe and check what DLLs it loads at runtime using Process Explorer [2], then I do see QtTest4.dll being loaded. It is not clear to me how exactly QtTest4.dll comes in. Since I don't see it when I investigate App.exe using Dependency Walker, I assume it comes in through one of the DLLs that gets loaded at runtime, but I haven't found which one yet.

    Furthermore, what I do find strange is that neither the qmake .pro file of App.exe nor any other .pro file of the DLLs that get loaded, has 'Qt += testlib' in it. Doesn't QtTest4.dll come in just because of that line?

    My questions are:

    1. Is there a way to find out through what loaded DLL the QtTest4.dll comes in at runtime?
    2. Why could QtTest4.dll be among the release mode dependencies? None of the .pro files has testlib added to the QT variable...

    Any suggestions on how to debug this any further are more than welcome.

    [1] http://www.dependencywalker.com/
    [2] https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx

    JKSHJ K 2 Replies Last reply
    0
    • B Bart_Vandewoestyne

      I am trying to figure out why the release build of one of our applications has a dependency on QtTest4.dll. Our setup is as follows: we use our own (Visual C++ 2012) build of Qt 4.8.7. We haven an application, let's call it App.exe, that among others loads DLLs using QLibrary::load().

      When I investigate App.exe with Dependency Walker [1], I cannot see QtTest4.dll among the module dependencies. However, when I run App.exe and check what DLLs it loads at runtime using Process Explorer [2], then I do see QtTest4.dll being loaded. It is not clear to me how exactly QtTest4.dll comes in. Since I don't see it when I investigate App.exe using Dependency Walker, I assume it comes in through one of the DLLs that gets loaded at runtime, but I haven't found which one yet.

      Furthermore, what I do find strange is that neither the qmake .pro file of App.exe nor any other .pro file of the DLLs that get loaded, has 'Qt += testlib' in it. Doesn't QtTest4.dll come in just because of that line?

      My questions are:

      1. Is there a way to find out through what loaded DLL the QtTest4.dll comes in at runtime?
      2. Why could QtTest4.dll be among the release mode dependencies? None of the .pro files has testlib added to the QT variable...

      Any suggestions on how to debug this any further are more than welcome.

      [1] http://www.dependencywalker.com/
      [2] https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @Bart_Vandewoestyne said:

      1. Is there a way to find out through what loaded DLL the QtTest4.dll comes in at runtime?
      2. Why could QtTest4.dll be among the release mode dependencies? None of the .pro files has testlib added to the QT variable...

      I suggest you create a Debug build of your app, and run it from a debugger (e.g. WinDbg -- you need to first install Debugging Tools for Windows). It will slowly and gradually load the various libraries that your application wants, and you can see exactly when QtTest4.dll gets loaded.

      @Bart_Vandewoestyne said:

      When I investigate App.exe with Dependency Walker [1], I cannot see QtTest4.dll among the module dependencies. However, when I run App.exe and check what DLLs it loads at runtime using Process Explorer [2], then I do see QtTest4.dll being loaded. It is not clear to me how exactly QtTest4.dll comes in. Since I don't see it when I investigate App.exe using Dependency Walker, I assume it comes in through one of the DLLs that gets loaded at runtime

      Your last statement is probably right. By the way, you can make Dependency Walker show the runtime-loaded DLLs by clicking "Profile" -> "Start Profiling..."

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

      1 Reply Last reply
      0
      • B Bart_Vandewoestyne

        I am trying to figure out why the release build of one of our applications has a dependency on QtTest4.dll. Our setup is as follows: we use our own (Visual C++ 2012) build of Qt 4.8.7. We haven an application, let's call it App.exe, that among others loads DLLs using QLibrary::load().

        When I investigate App.exe with Dependency Walker [1], I cannot see QtTest4.dll among the module dependencies. However, when I run App.exe and check what DLLs it loads at runtime using Process Explorer [2], then I do see QtTest4.dll being loaded. It is not clear to me how exactly QtTest4.dll comes in. Since I don't see it when I investigate App.exe using Dependency Walker, I assume it comes in through one of the DLLs that gets loaded at runtime, but I haven't found which one yet.

        Furthermore, what I do find strange is that neither the qmake .pro file of App.exe nor any other .pro file of the DLLs that get loaded, has 'Qt += testlib' in it. Doesn't QtTest4.dll come in just because of that line?

        My questions are:

        1. Is there a way to find out through what loaded DLL the QtTest4.dll comes in at runtime?
        2. Why could QtTest4.dll be among the release mode dependencies? None of the .pro files has testlib added to the QT variable...

        Any suggestions on how to debug this any further are more than welcome.

        [1] http://www.dependencywalker.com/
        [2] https://technet.microsoft.com/en-us/sysinternals/processexplorer.aspx

        K Offline
        K Offline
        KeithS
        wrote on last edited by
        #3

        @Bart_Vandewoestyne

        Just a thought, does your app load any plugins - either Qt ones or your own? If so check them as well for the dll. Same goes for any 3rd party dll's your app uses.

        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