Y
Yair
Hi,
I have an multi-platform application that uses dlls (shared objects).
I would like the application to export classes to be used by the dlls.
I thaught about the following solutions:
1. pack the classes that are shared by the the .exe and the .dll into
static library and statically link the dll and the application with
that lib.
2. pack the common data with a dll and statically link both the .exe
and the .dll files with the static lib of the dll.
3. use class factory function in the application, all class
implementations will be written in the application.
Option 1 tightly couples the dll and the application, and forces me to
recompile and relink my dll whenever change the shared code, and
duplicate the shared classes code both in the dll and the application.
Option 2 is slightly better taht option 1 but still requires an extra
dll to maintain.
Option 3 is good option, except the fact that the dll cannot inherit
and extend base classes from the applicaiton.
Option 3 seems to be my favor option, does anyone has other solutions?
(I cant use COM since my application is multi-platform).
Thanks,
Yair
I have an multi-platform application that uses dlls (shared objects).
I would like the application to export classes to be used by the dlls.
I thaught about the following solutions:
1. pack the classes that are shared by the the .exe and the .dll into
static library and statically link the dll and the application with
that lib.
2. pack the common data with a dll and statically link both the .exe
and the .dll files with the static lib of the dll.
3. use class factory function in the application, all class
implementations will be written in the application.
Option 1 tightly couples the dll and the application, and forces me to
recompile and relink my dll whenever change the shared code, and
duplicate the shared classes code both in the dll and the application.
Option 2 is slightly better taht option 1 but still requires an extra
dll to maintain.
Option 3 is good option, except the fact that the dll cannot inherit
and extend base classes from the applicaiton.
Option 3 seems to be my favor option, does anyone has other solutions?
(I cant use COM since my application is multi-platform).
Thanks,
Yair