doc: Fix command for creating a shared library.
authorMathieu Boespflug <m@tweag.io>
Sat, 28 Jul 2018 05:33:13 +0000 (07:33 +0200)
committerBen Gamari <ben@smart-cactus.org>
Tue, 31 Jul 2018 15:48:19 +0000 (11:48 -0400)
The previous command did not work. The `-o` flag was missing.
Moreover, without `-dynamic`, the `-shared` flag will raise obscure
link errors because GHC will try to use static objects when creating
the shared library.

docs/users_guide/packages.rst

index 7a54b4a..632162f 100644 (file)
@@ -1056,7 +1056,7 @@ extra indirection).
 
    .. code-block:: sh
 
-       ghc -shared libHSfoo-1.0-ghcGHCVersion.so A.o B.o C.o
+       ghc -shared -dynamic -o libHSfoo-1.0-ghcGHCVersion.so A.o B.o C.o
 
    Using GHC's version number in the shared object name allows different
    library versions compiled by different GHC versions to be installed