[mercury-users] Compilers anyone??

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Dec 19 00:42:22 AEDT 2002


On 18-Dec-2002, Noel  Pinto <cool4life at rediffmail.com> wrote:
> 
> I am using Windows98 OS and I have a Intel P-II machine .
> Mercury version is 0.10.1

C compilers for Windows include

	- GNU C (gcc):
		GNU C generates efficient code for Mercury-compiled
		programs.  Unlike all the other compilers mentioned
		below, the GNU C compiler is Free Software
		<http://www.gnu.org/philosophy/free-sw.html>.

		There are several ports of GNU C to Windows:

		- targetting the Cygwin Unix emulation library:
		  <http://www.cygwin.com>
		  This results in executables that uses Unix
		  path-name syntax, e.g. /tmp
		  There is a binary distribution of Mercury that
		  uses this version of GNU C.
		  This is probably the version that you are using already.

		- targetting native Windows:
		  <http://www.mingw.org>
		  This results in an executable that uses Windows
		  path-name syntax, e.g. C:\tmp
		  Unfortunately this one can't be used with Mercury
		  (or at least not easily).

		- cross-compiling from Cygwin to Windows:
		  <http://www.cygwin.com>; download the "mingw cross-compiler"
		  This one can be used with Mercury.
		  However, the process for doing so is not trivial
		  and is not yet documented.

		The source code for GNU C is available at <http://gcc.gnu.org>.

	- Microsoft Visual C (MSVC)
		See <http://msdn.microsoft.com/visualc/>.
		- I don't know off-hand how MSVC compares with GCC
		  as far as efficiency goes.
		- Using MSVC results in an executable that uses Windows
		  path-name syntax, e.g. C:\tmp
		- For efficient results, you need to use the hlc.gc grade
		  rather than the none.gc grade.
		- For instructions on how to build Mercury with MSVC,
		  see README.MS-VisualC in the Mercury distribution.

	- lcc-win32:
		See <http://www.cs.virginia.edu/~lcc-win32/>.
		This has faster compilation time than GNU C.
		However, it generates less efficient code.
		No-one has tried using with Mercury yet.
		It might require a bit of hacking to get it to work.

	- Intel C/C++ for Windows:
		See <http://www.intel.com/software/products/compilers/>.
		This generates faster code than GNU C for some applications.
		No-one has tried using with Mercury yet.
		It might require a bit of hacking to get it to work.

In short, for Mercury 0.10.1, the only C compilers on Windows which are
easily usable with Mercury are the Cygwin gcc and MSVC.  For Mercury 0.11,
I am also planning to build a binary distribution that uses the
Cygwin-to-Mingw cross-compiler version of GNU C.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list