[project @ 2001-09-25 11:46:33 by simonmar]
authorsimonmar <unknown>
Tue, 25 Sep 2001 11:46:33 +0000 (11:46 +0000)
committersimonmar <unknown>
Tue, 25 Sep 2001 11:46:33 +0000 (11:46 +0000)
Mention the use of the -no-hs-main flag when talking about linking
programs where main() is not provided by GHC.

ghc/docs/users_guide/ffi-chap.sgml

index c2d7b83..c1b0c8a 100644 (file)
@@ -152,6 +152,13 @@ int main(int argc, char *argv[])
        <para>The functions <literal>startupHaskell()</literal> and
        <literal>shutdownHaskell()</literal> may be called only once
        each, and only in that order.</para>
+
+       <para>NOTE: when linking the final program, it is normally
+       easiest to do the link using GHC, although this isn't
+       essential.  If you do use GHC, then don't forget the flag
+       <option>-no-hs-main</option><indexterm><primary><option>-no-hs-main</option></primary>
+         </indexterm>, otherwise GHC will try to link
+       to the <literal>Main</literal> Haskell module.</para>
       </sect3>
 
       <sect3 id="foreign-export-dynamic-ghc">