How to Create C/C++ Dynamic-link Libraries in Windows

Ng Wai Foong
AI2 Labs
Published in
7 min readApr 10, 2020

--

Modularize your program into separate components to ease deployment and installation

Photo by Panos Sakalakis on Unsplash

By reading this piece, you will learn to create your own shared libraries in Windows operating system. Based on the documentation provided by Microsoft, a DLL is:

“…a library that contains code and data that can be used by more than one program at the same time. This helps promote code reuse and efficient memory usage.

By using a DLL, a program can be modularized into separate components. For example, an accounting program may be sold by module. Each module can be loaded into the main program at run time if that module is installed. Because the modules are separate, the load time of the program is faster, and a module is only loaded when that functionality is requested.”

A program that utilizes DLL has the following advantages:

  • Uses fewer resources
  • Promotes modular architecture
  • Eases deployment and installation

There are 4 sections in this tutorial:

  1. Setup
  2. Implementation
  3. Linux
  4. Conclusion

Let’s proceed to the next section and start installing the necessary software.

--

--

Ng Wai Foong
AI2 Labs

Senior AI Engineer@Yoozoo | Content Writer #NLP #datascience #programming #machinelearning | Linkedin: https://www.linkedin.com/in/wai-foong-ng-694619185/