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 To Use Dll Files in Program

How To Use Dll Files in Program

Scheduled Pinned Locked Moved Unsolved General and Desktop
dllprogramfiles
5 Posts 3 Posters 2.3k 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.
  • M4RZB4NiM Offline
    M4RZB4NiM Offline
    M4RZB4Ni
    wrote on last edited by
    #1

    Hello
    i have Two Dll Files and i want use this files in my Program
    and use their Classes and Functions
    How i can Add This dlls and how i can use their Functions?

    Thanks
    M4RZB4Ni

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

      hi
      please read
      http://doc.qt.io/qt-5/third-party-libraries.html

      You can also open the .pro file and right click.
      This opens a dialog where you can input the info.

      Please note that not all DLLS can just be used with any compiler if not a plain c dll.
      So if you are using Mingw compiler and the dlls are compiled with VS compiler, it might not work.

      1 Reply Last reply
      0
      • M4RZB4NiM Offline
        M4RZB4NiM Offline
        M4RZB4Ni
        wrote on last edited by
        #3

        the dlls are written by c#!
        can i use it?
        and how i can use ActiveX IN QT(WRITTEN BY C# too).

        Thanks
        M4RZB4Ni

        mrjjM 1 Reply Last reply
        0
        • M4RZB4NiM M4RZB4Ni

          the dlls are written by c#!
          can i use it?
          and how i can use ActiveX IN QT(WRITTEN BY C# too).

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @M4RZB4Ni
          oh. not sure it can work.
          maybe with Visual Studio but surely not with mingw compiler.
          https://social.msdn.microsoft.com/Forums/vstudio/en-US/440aca96-288a-4d5c-ab9a-87ea2cdd5ca8/how-to-call-c-dll-from-c?forum=csharpgeneral

          Its not trivial though.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            VRHans
            wrote on last edited by
            #5

            Ignoring the Qt specific aspects of integrating a 3rd party library for just a moment, I would like to ask - are you implicitly or explicitly linking these DLLs into your application?

            Implicitly linking means (in case you don't know) means your code links with a *.lib that makes yours application need the DLL in order to run but also means you don't have to locate the functions you want to use in the DLL when your code runs. This is most likely the way you plan to use these DLLs.

            Explicitly linking means you don't do anything with the DLL until your application starts up - at that point your application code manually loads the DLL into its process space and your application code looks up the actual functions you want to use in the DLL. This is a very flexible way to use DLLs but you're probably not doing this.

            1 Reply Last reply
            1

            • Login

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