[Moved] dynamic linking(late bind) and pointer to member function
MonalisaKalla last edited by
I want to dynamically link the dll and then import a class from the dll written in VC ++ to the QT.
class written in VC++:
class _delspec(dllexport) A
static void FunB();
I want to import of the above class in my QT application and want to create object of this class and call the functions.Also i want to call the static member functions of the class into my QT application.
I do not want to include the header file where i have declared this class, in my QT application because the class have dependeny on lot of other classes, how can i achieve this?
Plwease provide your inputs.
EDIT: please surround code by @-tags, gerolf
giesbert last edited by
You will not achieve this :-)
It's C++, not Qt specific.
If you want to use late binding, you can only use C-exported functions, not classes.
There is one thing that is possible:
Use a creator pattern.
create a c-function (that has a C-export) which creates a class.
The class itself must implement a public interface , where the header must be used on both sides.
No other chance.
goetz last edited by
Moved to the C++ Gurus forum, as it's not Qt specific.