How to import external library at run time
Unsolved
General and Desktop
-
Dear Developers,
Please inform me whether there is way to import external library in qt at run time.
Right now I am importing external library for example "mcp2221_dll_um_x64" by using following lines in .pro file.
win32: LIBS += -L$$PWD/3rdparty/libs/mcp2221lib/ -lmcp2221_dll_um_x64 INCLUDEPATH += $$PWD/3rdparty/libs/mcp2221lib DEPENDPATH += $$PWD/3rdparty/libs/mcp2221lib
But I want to import external libraries by passing their names in constructor of C++ class at runtime as follows:
II2C_To_Serial("mcp2221_dll_um_x64");
Please inform me whether there a way to do it.
Please inform me if you need any other information from me.
Thanks :)
-
@saurabh162 If you want to load a library at runtime use https://doc.qt.io/qt-5/qlibrary.html
-
@jsulm Thank you very much for the information I will try it out and update.