X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fwin32-dlls.sgml;h=1435b1842ee50d360db1dff6a063999563cd12d2;hb=6942766ac64f71b57c85a4069900b383495e2bdb;hp=a7b107b40e33617e9bb51413636eb6d0abdb9818;hpb=57e8fda3236d05b26d0d76cb4593c4282a4d48f8;p=ghc-hetmet.git
diff --git a/ghc/docs/users_guide/win32-dlls.sgml b/ghc/docs/users_guide/win32-dlls.sgml
index a7b107b..1435b18 100644
--- a/ghc/docs/users_guide/win32-dlls.sgml
+++ b/ghc/docs/users_guide/win32-dlls.sgml
@@ -52,7 +52,7 @@ statically.
-4K for a "hello, world" application---not bad, huh? :-)
+4K for a "hello, world" application—not bad, huh? :-)
@@ -80,13 +80,13 @@ option on all the Haskell modules that make up your application.
-Making libraries into DLLs doesn't work on Windows at the
+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).
+(it's just inter-DLL Haskell calls that don't work).
Creating a Win32 DLL
---mk-dll
+––mk-dll
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:
-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
-By feeding the ghc compiler driver the option , it
+By feeding the ghc compiler driver the 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.
By default, the entry points of all the object files will be exported from
-the DLL when using . Should you want to constrain
+the DLL when using . Should you want to constrain
this, you can specify the module definition file to use
on the command line as follows:
-ghc --mk-dll -o .... -optdll--def -optdllMyDef.def
+ghc ––mk-dll -o .... -optdll--def -optdllMyDef.def
See Microsoft documentation for details, but a module definition file
@@ -159,7 +159,7 @@ EXPORTS
-In addition to creating a DLL, the option also
+In addition to creating a DLL, the 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
compile up a DllMain() that starts up the Haskell
-RTS---a possible implementation is:
+RTS-––a possible implementation is:
#include <windows.h>
#include <Rts.h>
-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:
-gcc -c dllMain.c
+ghc -c dllMain.c
@@ -276,7 +276,7 @@ gcc -c dllMain.c
Construct the DLL:
-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
@@ -284,7 +284,7 @@ ghc --mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
-Start using adder from VBA---here's how I would
+Start using adder from VBA-––here's how I would
Declare it: