Dynamic Link Libraries

Dynamic linked libraries such as the Windows files SDL.dll, SDL_image.dll, and SDL_mixer.dll have been compiled from source code (often written in C) and tested thoroughly. When they are used by programs they are loaded into main memory by a loader and linked at appropriate entry points by a linker. In order to use them in your Pascal programs, you use header files (language bindings) such as sdl.pas, sdlutils.pas, sdl_image.pas and sdl_mixer.pas. These contain Pascal declarations of subroutines that you can call from your programs.

You have a choice of methods to implement dynamic linked libraries. Ideally, you place the libraries in your system folder (such as C:\ WINDOWS\system32) so that you can access them from any program. If you are working on a networked computer and do not have permission to add files to the system folder, then you can put them in your program folder instead.

Similarly, you could put the required header files into each program folder. It is more convenient, however, to have one fixed location for your header files then add the path to the list of paths known to the compiler. See the Getting Started with SDL section for details

Programming - a skill for life!

How to use dynamic link libraries