DLL using shared MFC DLL vs DLL with MFC statically linked

2010-10-17


When you create a MFC library project using Visual Studio 2010, you will see the following screen to ask you choose a DLL type, so you might be confused by the following 2 options:

1: Regular DLL using shared MFC DLL

2: Regular DLL with MFC statically linked

So which one you should select?

First we can read the information from Microsoft :

1: Regular DLLs Statically Linked to MFC

2: Regular DLLs Dynamically Linked to MFC (Shared MFC DLL)

After you read above content, if you still have difficult to understand, then let me simply explain the differents:

If you don't want the DLL files included in your final executable software package, you should choose static library, because the static library DLL files have already been built in your final executable files. Your customers will not see these physical DLL files. However, if you need to update your product, you have to ship your new executable package to your customer, sometimes you have to headache since the file size is big.

If you just need to put the DLL files into your software package, you choose a shared MFC DLL. The dll library will be called at the runtime. When you deploy your software, you have to distribute these DLL files with your software together. The good point if you use this option is that you can update your own software and DLL files separately, That means you can ship the small size files to your customers.