Dynamic Loading

The
#ifdef DYNAMIC_LOADING
block is long, starting on line 97 and ending at line 339. This block contains function definitions for dynamic loading. It also contains the
LoadOneFunc()
procedure to obtain any requested function from the dynamic library and the
DynLoadDiskLib()
procedure to bind it. This demonstration feature could also be called “runtime loading” to distinguish it from dynamic linking.
To try the program with runtime loading enabled on Linux, add
-DDYNAMIC_LOADING
after
g++
in the
Makefile
and recompile. On Windows, define
DYNAMIC_LOADING
in the project.