Appendix A: Libraries
Abstract
Application programming interfaces are implemented and distributed as library files, either static libraries or dynamic libraries, such as Dynamic Link Libraries (DLLs) on Windows. This chapter describes the difference between static and dynamic libraries and the pros and cons of each, and covers the use of dynamic libraries to create plugins. Most of the chapter focuses on how to create static and shared libraries on Windows, Linux, and macOS. This addresses issues such as exporting symbols; DLL entry points; how to use Microsoft Visual Studio, XCode, and the GNU C++ compiler; using frameworks on the Mac; useful utilities to analyze library files such as libtool, nm, ldd, otool, tasklist.exe, and dlister.exe; and ...