Skip to content

Commit

Permalink
[Doc] Some precisions about -fpic and .so
Browse files Browse the repository at this point in the history
Signed-off-by: François Bobot <francois.bobot@cea.fr>
  • Loading branch information
bobot committed Jan 17, 2022
1 parent ac086a8 commit 7f9731b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/foreign-code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,12 @@ To do that, follow the following procedure:

- depends on this directory recursively via :ref:`source_tree <source_tree>`
- invokes the external build system
- copies the generated files
- the C archive ``.a`` must be built with ``-fpic``
- the ``libfoo.so`` must be copied as ``dllfoo.so``, and no ``libfoo.so``
should appear otherwise the dynamic linking of the C library will be
attempted, but usually fails because the ``libfoo.so`` is not available at
the time of the execution.
- *Attach* the C archive files to an OCaml library via :ref:`foreign-archives`.

For instance, let's assume that you want to build a C library
Expand Down

0 comments on commit 7f9731b

Please sign in to comment.