Using Visual C++ DLLs on a Qt Application.



  • I'm trying to protect my Qt application using a software protection dongle.

    I contacted a local provider trying to get some information about implementing this kind of devices on third party applications.

    Basically they'll provide me some DLLs which were created using Visual C++, so I shoud link to that libraries from my Qt Application.

    I wonder if it's possible for me to use these DLLs since my application compiles on Qt using MinGW, not MSVC.

    If it is so could you please guide me on the first steps, or maybe refer me to a good tutorial on how to do this kind of task?

    Thanks in advance!


  • Moderators

    Unfortunately, it's not possible to link things created with different compilers. Either you'll need a MinGW version of the libraries, or you'll need to build your app with MSVC.



  • You can link MSVC-compiled binaries to MinGW-compiled clients. You will need to convert binary format and re-create symbol table and .a file. (No need to re-compile)

    I didn't try it myself, but heard some success stories. Check "this link":http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs for more information.



  • It works for C, but not for C++. As MinGW and MSVC have different name mangling rules for C++.

    [quote author="soroush" date="1337929956"]You can link MSVC-compiled binaries to MinGW-compiled clients. You will need to convert binary format and re-create symbol table and .a file. (No need to re-compile)

    I didn't try it myself, but heard some success stories. Check "this link":http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs for more information. [/quote]


Log in to reply
 

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