Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Call for Presentations - Qt World Summit

    Unsolved Qt on VS 2017: Link DLLs at Runtime

    Installation and Deployment
    3
    6
    2252
    Loading More Posts
    • 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
      alexCali last edited by

      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 Reply Quote 0
      • yuvaram
        yuvaram last edited by

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

        Yuvaram Aligeti
        Embedded Qt Developer
        : )

        1 Reply Last reply Reply Quote 0
        • A
          alexCali last edited by

          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 Reply Quote 0
          • J
            jackmack last edited by

            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 Reply Quote 0
            • A
              alexCali last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • A
                alexCali @jackmack last edited by

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

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post