How To Use Dll Files in Program



  • 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?


  • Qt Champions 2016

    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.



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


  • Qt Champions 2016

    @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.



  • 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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.