Using .dll in QT
-
Dear all:
I survey some documents. I only know maybe I can use "QLibrary" to take symbol in my .dll. Now the problem is how can I use symbol in my .dll.For example if I had a class named "TakeIt", how should I do that I can use this class in my QT!?? Thanks. -
Hi,
If it's your own dll, then you have the corresponding includes and lib file thus you can use the same technique like for any other framework.
@
INCLUDEPATH += path_to_your_includes
LIBS += -Lpath_to_your_lib_file -llibrary_name
@ -
Thanks. It's not my dll which release from manufacturer. I checked document about "QLibrary", does it only can use on "function" symbol? Because I implemented on other framework, I just set up reference and I can call the whole class that I want in my program.So, I want to know if I call class which is packeted into .dll file, how should I do in QT??
-
Hi lvan1120,
Generally speaking,
the managed dll which is generated by .net framework can not be access by native C++ directly. So it can not be used in Qt directly.You need to use C or C++ API provided by the device manufacturer or OS.
-
Thanks. I see: )).By the way, if I want to use whole class in .dll file or .lib file from C or C++, I just do that SGaist said and include .h file, right!?