X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fusers_guide%2Fwin32-dlls.xml;h=7b0e726b529c8a77ee7cb1f15b40b6e6e26e6d95;hb=059f2d7be7cc02d093ce51f0bbd68f5e5ebe527d;hp=11eaefffbb717be383f8562f44532b70ee70a009;hpb=9b8b293b6b4f7de08a568cac1ccdaf3f1ee792a5;p=ghc-hetmet.git
diff --git a/docs/users_guide/win32-dlls.xml b/docs/users_guide/win32-dlls.xml
index 11eaeff..7b0e726 100644
--- a/docs/users_guide/win32-dlls.xml
+++ b/docs/users_guide/win32-dlls.xml
@@ -71,7 +71,7 @@ Notice how the "%1" argument is quoted (or not).
This problem doesn't just affect GHCi, it affects any
GHC-compiled program that wants to catch console events. See the
GHC.ConsoleHandler
+ url="&libraryBaseLocation;/GHC-ConsoleHandler.html">GHC.ConsoleHandler
module.
@@ -210,7 +210,8 @@ make-sessions running under cygwin.
Making Haskell libraries into DLLs doesn't work on Windows at the
-moment; we hope to re-instate this facility in the future. Note that
+moment; we hope to re-instate this facility in the future
+(see ). Note that
building an entire Haskell application as a single DLL is still supported: it's
just multi-DLL Haskell programs that don't work. The Windows
distribution of GHC contains static libraries only.
@@ -294,7 +295,7 @@ option on all the Haskell modules that make up your application.
Creating a Win32 DLL
-––mk-dll
+–shared
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:
@@ -302,12 +303,12 @@ the DLL by issuing a command of the form:
-ghc ––mk-dll -o foo.dll bar.o baz.o wibble.a -lfooble
+ghc –shared -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.
@@ -347,12 +348,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 –shared -o .... MyDef.def
See Microsoft documentation for details, but a module definition file
@@ -371,22 +372,22 @@ 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:
-DLL: HScool.dll ==> import lib: libHScool_imp.a
+DLL: HScool.dll ==> import lib: libHScool.dll.a
The naming scheme may look a bit weird, but it has the purpose of allowing
the co-existence of import libraries with ordinary static libraries (e.g.,
libHSfoo.a and
-libHSfoo_imp.a.
+libHSfoo.dll.a.
Additionally, when the compiler driver is linking in non-static mode, it
will rewrite occurrence of on the command line to
-. By doing this for you, switching from
+. By doing this for you, switching from
non-static to static linking is simply a question of adding
to your command line.
@@ -485,7 +486,7 @@ ghc -c dllMain.c
Construct the DLL:
-ghc ––mk-dll -o adder.dll adder.o adder_stub.o dllMain.o
+ghc –shared -o adder.dll adder.o adder_stub.o dllMain.o
@@ -630,7 +631,6 @@ the include files like HsFFI.h etc).