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. QT Visual Studio Release: how to make the .exe find dependencies
Forum Updated to NodeBB v4.3 + New Features

QT Visual Studio Release: how to make the .exe find dependencies

Scheduled Pinned Locked Moved Solved General and Desktop
windeployqtvisual studio
2 Posts 2 Posters 758 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.
  • D Offline
    D Offline
    Daddedebad
    wrote on 7 Feb 2023, 12:30 last edited by
    #1

    Hey, I have a QT program made in visual studio that I want to make a release for. I can do this and add dependencies such as QT5Core.dll by using windeployqt. No issues and the .exe of my program runs fine.

    My issue is that I do not want all these dependencies in the same folder as the .exe. I have found how to make windeployqt put the dependencies in a separate folder:

    Skärmklipp2.PNG

    Skärmklipp1.PNG

    The .exe cannot find the dependencies in the picture above. From what I understand the .exe is not a standalone executable. It is created first, then windeployqt adds the dependencies. But is there a setting for changing how the .exe is made so that it looks for a dependencies folder for its neccessary files?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 7 Feb 2023, 18:18 last edited by Chris Kawa 2 Jul 2023, 18:20
      #2

      It's not related to Qt or windeployqt and it's not about how the exe is made. Windows has a defined search order when it loads linked dynamic libraries. Other dlls, like plugins or resources, that load later on demand can be relocated via qtconf file.

      In short - that's just how Windows organizes dlls.
      You can fiddle with the local startup environment e.g. make a batch script that adds the dependencies subdirectory to PATH or changes working dir and you'd start your app by running it, but it's quite unusual and ugly.

      I'd say just get used to having bunch of dlls next to your exe, even if it's not to your taste. That's what Windows apps do.

      1 Reply Last reply
      1
      • D Daddedebad has marked this topic as solved on 8 Feb 2023, 07:02

      1/2

      7 Feb 2023, 12:30

      • Login

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