The advantage of DLL packaging classes

I just finished the stage of my project, where I wrote a small infrastructure for a specific task, consisting of a main class with several helper classes. C ++ - this is pretty basic - one inheritance, some STL containers, as they are. No threads - client starts displaying.

What I would like to do now is to wrap all this in a DLL, its version and use it as a separate device. I would like this separation to track changes and develop better and, possibly, for other projects.

Since I have no experience with classes in DLLs, I would like to hear yours: What is your approach to this problem?

In particular:

  • Is it worth the worry?
  • Do you often do this or not?
  • As for compatibility issues (for example, compiled using another compiler)?

I am not asking for debate (although this is a likely outcome), but rather advice from experience.

Thank you for your time.

+5
source share
2 answers

It’s hard for me to see any benefit from this. I see a lot of problems:

  • No type checking across the dll border. Any version mismatches will lead to runtime crashes that are harder to detect than compile-time crashes.
  • Additional headaches when deployed. You might be tempted to update some, but not all, of the modules and therefore deal with complex dependencies.
  • All clients who want to use these DLLs must use the same compiler.

, , .

+2

++- , , DLL, ++, , .

Windows DLL - , , COM- inproc.

+1

All Articles