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 MSVC2013 cannot link against .dll
Forum Updated to NodeBB v4.3 + New Features

Qt MSVC2013 cannot link against .dll

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.6k 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.
  • strahlexS Offline
    strahlexS Offline
    strahlex
    wrote on last edited by
    #1

    For some reason the Qt MSVC2013 version always tries to link against .lib files. However, I do need to link against a dynamic linked library (.dll). Is there a way to force the MSVC linker to use .dll files?

    Regards
    Strahlex

    Feel free to check out my website machinekoder.com
    and my pet projects Intellicute and QtQuickVcp

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      That's normal, you don't link against dlls but either against "import libraries":http://en.wikipedia.org/wiki/Dynamic-link_library#Import_libraries or static libraries, both having the same extension.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • strahlexS Offline
        strahlexS Offline
        strahlex
        wrote on last edited by
        #3

        Interesting. For some reason my Qt library project only creates a dll file no .lib. Is there a way to force Qt creating the .lib file without making the library static?

        Feel free to check out my website machinekoder.com
        and my pet projects Intellicute and QtQuickVcp

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Are you exporting any symbol from your library ? If not, then on Windows you won't have any import library generated.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • strahlexS Offline
            strahlexS Offline
            strahlex
            wrote on last edited by
            #5

            Not explicitly. I export only descriptor classes generated by protobuf. It works everywhere except on Windows. But, for some reason it seems to be no problem to use the static library on Windows anyway (on other platforms protobuf classes do not like to be included more than once)

            Feel free to check out my website machinekoder.com
            and my pet projects Intellicute and QtQuickVcp

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              Then you should do the exports. Qt has some macro helpers for that that you can re-use.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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