[project @ 2002-11-11 10:59:07 by simonpj]
[ghc-hetmet.git] / ghc / docs / users_guide / win32-dlls.sgml
index a7b107b..1435b18 100644 (file)
@@ -52,7 +52,7 @@ statically.
 </Para>
 
 <Para>
-4K for a <Literal>"hello, world"</Literal> application---not bad, huh? :-)
+4K for a <Literal>"hello, world"</Literal> application&mdash;not bad, huh? :-)
 </Para>
 
 </Sect1>
@@ -80,13 +80,13 @@ option on all the Haskell modules that make up your application.
 </Title>
 
 <Para>
-<Strong>Making libraries into DLLs doesn't work on Windows at the
+<emphasis>Making libraries into DLLs doesn't work on Windows at the
 moment (and is no longer supported); however, all the machinery is
 still there. If you're interested, contact the GHC team. Note that
 building an entire Haskell application as a DLL is still supported
-(it's just inter-DLL Haskell calls that don't work).</Strong>
+(it's just inter-DLL Haskell calls that don't work).</emphasis>
 <IndexTerm><Primary>Creating a Win32 DLL</Primary></IndexTerm>
-<IndexTerm><Primary>--mk-dll</Primary></IndexTerm>
+<IndexTerm><Primary>&ndash;&ndash;mk-dll</Primary></IndexTerm>
 Sealing up your Haskell library inside a DLL is straightforward;
 compile up the object files that make up the library, and then build
 the DLL by issuing a command of the form:
@@ -94,12 +94,12 @@ the DLL by issuing a command of the form:
 
 <Para>
 <Screen>
-ghc --mk-dll -o foo.dll bar.o baz.o wibble.a -lfooble
+ghc &ndash;&ndash;mk-dll -o foo.dll bar.o baz.o wibble.a -lfooble
 </Screen>
 </Para>
 
 <Para>
-By feeding the ghc compiler driver the option <Option>--mk-dll</Option>, it
+By feeding the ghc compiler driver the option <Option>&ndash;&ndash;mk-dll</Option>, it
 will build a DLL rather than produce an executable. The DLL will
 consist of all the object files and archives given on the command
 line.
@@ -135,12 +135,12 @@ you compile into a DLL must have a common root.
 <ListItem>
 <Para>
 By default, the entry points of all the object files will be exported from
-the DLL when using <Option>--mk-dll</Option>. Should you want to constrain
+the DLL when using <Option>&ndash;&ndash;mk-dll</Option>. Should you want to constrain
 this, you can specify the <Emphasis>module definition file</Emphasis> to use
 on the command line as follows:
 
 <Screen>
-ghc --mk-dll -o .... -optdll--def -optdllMyDef.def
+ghc &ndash;&ndash;mk-dll -o .... -optdll--def -optdllMyDef.def
 </Screen>
 
 See Microsoft documentation for details, but a module definition file
@@ -159,7 +159,7 @@ EXPORTS
 
 <ListItem>
 <Para>
-In addition to creating a DLL, the <Option>--mk-dll</Option> option also
+In addition to creating a DLL, the <Option>&ndash;&ndash;mk-dll</Option> option also
 creates an import library. The import library name is derived from the
 name of the DLL, as follows:
 
@@ -232,13 +232,13 @@ This will produce two files, adder.o and adder_stub.o
 <ListItem>
 <Para>
 compile up a <Function>DllMain()</Function> that starts up the Haskell
-RTS---a possible implementation is:
+RTS-&ndash;&ndash;a possible implementation is:
 
 <ProgramListing>
 #include &lt;windows.h&gt;
 #include &lt;Rts.h&gt;
 
-EXTFUN(__init_Adder);
+EXTFUN(__stginit_Adder);
 
 static char* args[] = { "ghcDll", NULL };
                        /* N.B. argv arrays must end with NULL */
@@ -252,7 +252,7 @@ DllMain
 {
   if (reason == DLL_PROCESS_ATTACH) {
       /* By now, the RTS DLL should have been hoisted in, but we need to start it up. */
-      startupHaskell(1, args, __init_Adder);
+      startupHaskell(1, args, __stginit_Adder);
       return TRUE;
   }
   return TRUE;
@@ -266,7 +266,7 @@ single module tree in the DLL).
 Compile this up:
 
 <Screen>
-gcc -c dllMain.c
+ghc -c dllMain.c
 </Screen>
 </Para>
 </ListItem>
@@ -276,7 +276,7 @@ gcc -c dllMain.c
 Construct the DLL:
 
 <Screen>
-ghc --mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
+ghc &ndash;&ndash;mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
 </Screen>
 
 </Para>
@@ -284,7 +284,7 @@ ghc --mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
 
 <ListItem>
 <Para>
-Start using <Function>adder</Function> from VBA---here's how I would
+Start using <Function>adder</Function> from VBA-&ndash;&ndash;here's how I would
 <Constant>Declare</Constant> it:
 
 <ProgramListing>