	Windows 64 compilation/installation instructions
                         Daniel Diaz


NB: Please read the src/WINDOWS file first !

This file only documents the 64 bits specific part.

The preliminar port to Win64 has been done in Jan 2011 by
Jasper Taylor <jasper@simulistics.com>. Many thanks to him !
I have then added some finishing touches.

I have tested it under x86-64/Windows 7. I use cygwin as compilation
environment (see file WINDOWS). I used mingw-w64 which delivers a complete
toolchain (runtime, headers, and libs) for developing 64 bit (x64), as well
as 32 bit (x86), windows applications using gcc. It possible to get mingw-w64
from http://mingw-w64.sourceforge.net/ or, for cygwin, with the cygwin setup.exe 
utility (selecting the mingw package).

Tested with mingw64/mingw32 gcc version 4.5.3

With the cygwin package things are installed in:

   /usr/x86_64-w64-mingw32/  and in  /usr/i686-w64-mingw32/
      bin
      lib
      lib64
      sys-root
      sys-root/mingw
      sys-root/mingw/bin
      sys-root/mingw/include
      sys-root/mingw/lib

The toolchain executables are all prefixed with:

   x86_64-w64-mingw32 (e.g. x86_64-w64-mingw32-gcc.exe) 
   to produce 64 bits objs/execs/libs/...

and with 

   i686-w64-mingw32   (e.g. i686-w64-mingw32-gcc.exe)
   to produce 32 bits objs/execs/libs/...

Strictly speaking i686-... are not needed here (since we are interested in 64 bits)

To use HtmlHelp you maybe need to copy:

   the header file:

   htmlhtlp.h  in /usr/x86_64-w64-mingw32/sys-root/mingw/include/htmlhelp.h
   htmlhtlp.h  in /usr/i686-w64-mingw32/sys-root/mingw/include/htmlhelp.h


   the lib (beware to copy the adequate version of the lib 32 != 64)

   copy + rename the 64 bits version of Htmlhelp.lib as
   /usr/x86_64-w64-mingw32/sys-root/mingw/lib/libhtmlhelp.a
   (you can find it for instance in C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib/x64)

   copy + rename the 32 bits version of Htmlhelp.lib as
   /usr/i686-w64-mingw32/sys-root/mingw/lib/libhtmlhelp.a
   (you can find it for instance in C:/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Lib/)


Configuration
-------------

Open a Cygwin shell and go to GNU Prolog source directory:

type 
    ./configure --host=x86_64-w64-mingw32

(or ./configure --host=i686-w64-mingw32 to build a 32 bits version)


NB: with this configuration all needed tools (gcc, ar, ...) are first searched 
prefixed with x86_64-w64-mingw32 (or i686-w64-mingw32) as provided by the cygwin package.

then
    make
    make check
    make install


LIMITATIONS
-----------

Currently hardware detection of stack overflows does not work 
(SEH is not yet implemented in mingw64).



