dll and c++

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
 
G

Gianni Mariani

Yair wrote:
....
Option 3 seems to be my favor option, does anyone has other solutions?
(I cant use COM since my application is multi-platform).

Suggestion: Austria C++ factories ! (shameless plug)

See a recent c.l.c++ posting.

http://tinyurl.com/4ygn6

Austria C++ factories should work on all platforms that are C++
standards compliant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,183
Messages
2,570,966
Members
47,516
Latest member
ChrisHibbs

Latest Threads

Top