Loading native libraries
Factor handbook ยป C library interface

Next:Calling C from Factor


Before calling a C library, you must associate its path name on disk with a logical name which Factor uses to identify the library:
add-library ( name path abi -- )

remove-library ( name -- )


Once a library has been defined, you can see if the library has correctly loaded:
library-dll ( obj -- dll )


If the compiler cannot load a library, or cannot resolve a symbol in a library, a linkage error is reported using the compiler error mechanism (see Compiler errors). Once you install the right library, reload the source file containing the add-library form to force the compiler to try loading the library again.

Libraries that do not come standard with the operating system need to be included with deployed applications that use them. A word is provided to instruct Application deployment that a library must be so deployed:
deploy-library ( name -- )