7.2.3 Compiling libraries

To create shared libraries one should use the library keyword in the main compilation file (the project file). For more information on creating shared libraries, chapter 12, page 644.

The .o object files that the compiler writes when it compiles a unit, are regular object files as they are produced by a C compiler. They can be combined using the ar and ranlib tools into a static library. However, for various reasons, this is a bad idea.

To remedy these (and other) problems requires intimate knowledge of the inner workings of the compiler and RTL, and it is therefore a bad idea to attempt the use of static libraries with Free Pascal.