Reputation: 2777
I have a DLL created in Visual Studio. It is for Peak USB to CAN device. This DLL is given by the vendor.
Now i want to use this DLL inside a Qt GUI. I am using default compiler of Qt to compile the Qt GUI application.
Is it possible to use this DLL created in Visual Studio directly inside Qt application?
What is exact procedure for this? I am doing it first time so please suggest.
Do gui & dll have to be compiled with same compiler to use properly?
Edit :
how can i confirm what i have installed .. means what compiler is used by QT on my PC ?
i have installed using following offline
installer QtSdk-offline-win-x86-v1_2_1.exe is it MSVC specific ?
Upvotes: 1
Views: 3695
Reputation: 175
use QLibrary
.
I tried Qt() to call DLL(FORTRAN). it works well.
wish it coud help
Upvotes: 0
Reputation: 25155
With "default compiler of Qt" you probably mean mingw.
Using MSVC-compiled DLLs will not work then. DLLs compiled from C++ with MingW and MSVC are ABI-incompatible to each other, i.e. cannot be mixed (plain C libraries work though).
I suggest to download Qt for MSVC and use that.
Upvotes: 2
Reputation: 87386
Yes, it is possible and I have done it before. I am assuming you are talking about a Win32 DLL, probably written in C. Using any language other than C could be tricky.
I don't remember the exact procedure but here is the outline:
Upvotes: 0