Docs GODI Archive
Projects Blog Knowledge

Look up function:

(e.g. "List.find" or "keysym")
More options

Why does findlib not automatically include the -custom option if linked with C code?

Short answer: Because there are several ways of linking, and findlib is not the right instance to find out the right way

Recent versions of OCaml support DLLs, at least for some platforms. Here, the option -custom is not necessary at all, because the C libraries can be looked up and loaded at runtime. The option -custom would have the effect of forcing static linking.

But even for platforms without DLL support, there are two alternatives. One possibility is to use -custom, and the other is to create runtime systems with -make-runtime, and reference them with -use-runtime. Fortunately, recent versions of OCaml select now themselves -custom automatically if -make-runtime is omitted, so findlib needs not to bother with it.

This web site is published by Informatikb√ľro Gerd Stolpmann
Powered by Caml