Jump to content
22 hours ago, maulemall said:

I have Microsoft C++ from 2005 to 2016. Are these builds or are they independent and doing their own thing.,.

And as a WTF.. What is that thing..

Good question.

This is the good and the ugly of DLLs, something that is unique to Windows.

First, let's see what are DLLs. DLLs files are like executable, but does not contain the surroundings to make be able to run on its own. It just contains functions that are ready to be executed by whoever loads/link the DLL in itself.

 

When a developer uses C++, to make a program, he or she may use Microsoft made APIs which are well-tested, well-optimized, secure and widely used code, inside their apps, instead of doing all the lengthy work themselves, leading in re-inventing the wheel for nothing, and end up with, in most cases, an inferior quality code.

 

Depending on the version of Visual Studio that the developer uses, the program needs to link to a specific version of the DLLs to use these API functions. So basically, every version "Microsoft Visual C++" that you see, correspond to a version of Visual Studio. For example, Visual Studio 2010, will have: "Microsoft Visual C++ 2010" version for both 32 and 64-bit.

 

Now, in reality, they are 2 ways to link with a DLL for the APIs. Statically, or Dynamically.

Statically, means that the compiler of the software (the thing that converts programming code into a machine language (1's and 0's)), will "merge" the APIs used with the program, like if the developer coded it him or herself. This gives you a large file size, but more standalone.

 

Dynamically, means the user needs to have the DLLs needed. So in this case, it needs to have the Microsoft Visual C++ Redistributables files installed on the user system in order to use the program. This makes the program have a smaller footprint, and ideally, it makes the user save space on their HDD/SSD as multiple programs can use the same shared files.

 

And this is a whole debate on which is best to use in today's worlds in the Windows programs dev communities.

 

Some say that, these days we are no longer restricted with small files sizes, due to large advances in internet speed, HDD/SSD storage space, and disks space with the advent of CDs (750MB) and DVDs, comparatively to diskettes/floppy disk (holds < 1.5MB for many mass consumer formats). So, static link to the DLLs is the way to go. Makes the software more stand alone, and easier to support, and makes the consumer computer look more clean, giving them a better experience.

 

While others pushes for the spirit of DLLs, and the possibility that Microsoft can release patches if anything is critical that needs to be updated due to some bug, or just what they are used to from the "good old days". in addition, dynamic link libraries are loaded into memory only when used, not continuously, so it reduces memory footprint. But then again others will says, who cares, most system have plenty of RAM (unless the target product is for a market that fall into an exception where RAM is limited), and then the counter argument is that, well if all software did this, than 4GB of RAM on a system won't be enougth, and this is what they charts says that most people have, or less.

 

My observation is that most of the younger devs favors the best possible experience for the user, and opt in to go with static linked libraries, UNLESS the software is designed to run under limited storage or RAM, and has any specific requirements that forces one option over the other. The mentality os that we have plenty of RAM and storage space, both of witch is cheap. Software used to push hardware, now it is no longer the case, so why affect the user experience. While this is mostly fixed these days, since Windows XP, and more so, since Vista days, DLL conflict hell when using dynamic linked DLLs is mostly solved (a downside of dynamic link memory), it can also be one, so static simplifies everyone life (Devs, support, consumers, and keeps consumers system look cleaner, and not have to worry about needing to install extra stuff to make the program run).

 

 

Link to comment
https://linustechtips.com/topic/575829-how-many-c-do-you-need/#findComment-7537443
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×