Linking issues
When you only use Pascal code, and Pascal units, then you will not see much of the part that the linker plays in creating your executable. The linker is only called when you compile a program. When compiling units, the linker isn’t invoked.
However, there are times that linking to C libraries, or to external object files created by other compilers, may be necessary. The Free Pascalcompiler can generate calls to a C function, and can generate functions that can be called from C (exported functions).
- Using external code and variablesIn general, there are 3 things you must do to use a function that resides in an external library or object file: You must make a pascal declaration of the funct
- Making librariesFree Pascalsupports making shared or static libraries in a straightforward and easy manner. If you want to make static libraries for other Free Pascalprogrammer
- Using smart linkingYou can compile your units using smart linking. When you use smartlinking, the compiler creates a series of code blocks that are as small as possible, i.e. a co
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
