building an entire Haskell application as a DLL is still supported
(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>––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:
<Para>
<Screen>
-ghc --mk-dll -o foo.dll bar.o baz.o wibble.a -lfooble
+ghc ––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>––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.
<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>––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 ––mk-dll -o .... -optdll--def -optdllMyDef.def
</Screen>
See Microsoft documentation for details, but a module definition file
<ListItem>
<Para>
-In addition to creating a DLL, the <Option>--mk-dll</Option> option also
+In addition to creating a DLL, the <Option>––mk-dll</Option> option also
creates an import library. The import library name is derived from the
name of the DLL, as follows:
<ListItem>
<Para>
compile up a <Function>DllMain()</Function> that starts up the Haskell
-RTS---a possible implementation is:
+RTS-––a possible implementation is:
<ProgramListing>
#include <windows.h>
Construct the DLL:
<Screen>
-ghc --mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
+ghc ––mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
</Screen>
</Para>
<ListItem>
<Para>
-Start using <Function>adder</Function> from VBA---here's how I would
+Start using <Function>adder</Function> from VBA-––here's how I would
<Constant>Declare</Constant> it:
<ProgramListing>