DLL vs. Static linking

I was involved into discussion about 2 ways of C/C++ windows application project: split the project into DLL vs. static linking or even compiling from sources. One of the opinions was to use DLL’s as default and best development/runtime structure.

I disagree with such point of view. From my 10+ years of successful C/C++ programming experience it would be better to use static linking or even compile the code from source.

  1. It would be better to avoid DLL’s because of potential ‘DLL hell’ problem.
  2. If you compile from sources then you have ability to provide changes and compiler optimization if you need.
  3. Less files as project build would be easy to support.

Of course, there would be reasons to use DLL’s as well, like, plugin’s pattern, multi-language development or some kind of separation in the development process, e.g., component model or to crypt/protect the code. But (one more time) by default it would be better to avoid using DLL’s.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: