Go to the first, previous, next, last section, table of contents.


Overriding C libraries

C libraries needed to link with a library are most of the time specified by the Ocaml library itself. However, you may need to override the defaults in particular cases, for examples if your library version does not match the library version used to compile the CDK.

This can be done by adding a "library".link file in the directory where the "library".cma or "library.cmxa" is located.

During installation, the CDK creates templates "library".link.old files, containing the defaults options for all libraries. For example, the labltk sub-directory contains a two-lines file labltk.link.old file:

-llabltk41 -ltk8.3 -ltcl8.3 -ldl -lX11
-L/usr/X11R6/lib

If you tk library is not 8.3, you can create a file called labltk.link in the same directory, containing the two lines:

-llabltk41 -ltk -ltcl -ldl -lX11
-L/usr/X11R6/lib

which will force Ocaml to use these new flags instead of the old ones.


Go to the first, previous, next, last section, table of contents.