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. Qt on VS 2017: Link DLLs at Runtime

Qt on VS 2017: Link DLLs at Runtime

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 3 Posters 2.7k Views
  • 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.
  • A Offline
    A Offline
    alexCali
    wrote on last edited by
    #1

    Hello everyone,

    I just started using Qt on VS today and I am running into a small issue.
    I can build my solution with no problems, both in Debug and Release mode 64-bit, but when I try to run it I get run time errors.
    The errors are all related about not finding DLL files at run time such as Qt5Widgets.dll and Qt5Core.dll.

    How can I fix this issue properly? I have done some research and people suggest to copy these DLL files in the folder of where the .exe is created. Are there any other approaches I can use? For example changing some settings in the projects?

    Thank you everyone for your help and tips.

    Bests,
    Rosario

    1 Reply Last reply
    0
    • yuvaramY Offline
      yuvaramY Offline
      yuvaram
      wrote on last edited by
      #2

      Hi @alexCali
      This type of question already discussed and solved
      Please refer Executable Creation

      Yuvaram Aligeti
      Embedded Qt Developer
      : )

      1 Reply Last reply
      0
      • A Offline
        A Offline
        alexCali
        wrote on last edited by
        #3

        Thank you for your reply however I don't think that solves my issue.
        I need to be able to run my application from within Visual Studio.
        So, when I press F5 on Visual Studio I need to be able to debug my application.

        Any hints on how to do it on Visual Studio and not on Qt Creator?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jackmack
          wrote on last edited by
          #4

          I use Qt 5.9.3 with VS2017 on win7, 64bit.
          My app is compiled as 32bit.

          I create a .vcxproj file via qmake from my .pro file.
          VS2017 is started about a .bat containing following:

          @echo off
          echo **********************************************************
          echo ** Setting up environment VS2017 for Qt 5.9.3 (x86) usage 
          echo **********************************************************
          echo ...
          call C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Professional\VC\Auxiliary\Build\vcvars32.bat
          devenv /useenv
          

          Additionally I have set the environment variable QTDIR=C:\Qt\Qt5.9.3\5.9.3\msvc2015 and add it to PATH=%QTDIR%\bin;%PATH%

          This allows me to start any Qt 5.9.3 based app from anywhere on my computer.

          Cheers

          A 1 Reply Last reply
          0
          • A Offline
            A Offline
            alexCali
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • J jackmack

              I use Qt 5.9.3 with VS2017 on win7, 64bit.
              My app is compiled as 32bit.

              I create a .vcxproj file via qmake from my .pro file.
              VS2017 is started about a .bat containing following:

              @echo off
              echo **********************************************************
              echo ** Setting up environment VS2017 for Qt 5.9.3 (x86) usage 
              echo **********************************************************
              echo ...
              call C:\"Program Files (x86)"\"Microsoft Visual Studio"\2017\Professional\VC\Auxiliary\Build\vcvars32.bat
              devenv /useenv
              

              Additionally I have set the environment variable QTDIR=C:\Qt\Qt5.9.3\5.9.3\msvc2015 and add it to PATH=%QTDIR%\bin;%PATH%

              This allows me to start any Qt 5.9.3 based app from anywhere on my computer.

              Cheers

              A Offline
              A Offline
              alexCali
              wrote on last edited by
              #6

              @jackmack Are you also able to debug your Qt Application using VS 2017 and its Debugger?

              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