caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "David Allsopp" <dra-news@metastack.com>
To: <caml-list@yquem.inria.fr>
Subject: RE: [Caml-list] Re: OCaml on Windows help
Date: Tue, 23 Oct 2007 08:38:19 +0100	[thread overview]
Message-ID: <036201c81547$aeed55b0$017ca8c0@countertenor> (raw)
In-Reply-To: <471D1FD4.6040908@sbcglobal.net>

> It was challenging though to get the windows executable and lib paths set
> correctly so that ocamlopt would use the tools it was designed for.  (I
> had several versions of many programs that were for other unrelated
> purposes.)  As best as I can tell, I also had to rebuild OCaml because I
> was using MSVC 6 and getting link errors.   I think this was due to 
> ocamlopt trying to combine the released version of 3.10.0 with the run 
> time libraries that I have which mixed versions of the MSVC libraries.

Unless you've got a compelling reason to use the Microsoft toolchain, I've
always found that building OCaml from source using Cygwin/MinGW is
painless... below is my complete build procedure which gives OCaml 3.09.3
with ocamlopt support (with due credit to
http://ibgs.christoph-bauer.net/~fridolin/omm/protokol.txt). My installation
prevents Cygwin from being integrated with the Windows shell because I use
the Win32 ports of the UNIX tools rather than Cygwin's.


David


-----
Run D:\Maintenance\Software\Tcl 8.3.2.exe
	Install to C:\Dev\Tcl
	Install "Tcl Run-Time Files" and "Header and Library Files" only
	Set LIB=C:\Dev\Tcl\lib
	The restart option just logs off so restart manually
Run D:\Repositories\Cygwin\setup.exe
	In Devel, add
		gcc-core
		make
	Remove C:\cygwin\bin from PATH
Start Bash
	$ mkdir /cygdrive/c/Dev/Src
	$ cd /cygdrive/c/Dev/Src
	$ cp /cygdrive/d/Maintenance/Software/OCaml/ocaml-3.09.3.tar.gz .
	$ tar -xzf ocaml-3.09.3.tar.gz
	$ cd ocaml-3.09.3
	$ cp config/m-nt.h config/m.h
	$ cp config/s-nt.h config/s.h
	$ cp config/Makefile.mingw config/Makefile
	$ sed -i -e '20s/=.*$/=C:\/Dev\/OCaml/' -e
'113s/=.*$/=C:\/Dev\/Tcl/' config/Makefile
	$ make -f Makefile.nt world bootstrap opt opt.opt install
	$ sed -i -e 's/\//\\/g' /cygdrive/c/Dev/OCaml/lib/ld.conf
	$ exit
Ensure that C:\Dev\Tcl\bin is in the PATH, add C:\Dev\OCaml\bin
Set OCAMLLIB to C:\Dev\OCaml\lib
Copy C:\cygwin\bin\{cygwin1.dll,cygintl-3.dll,cygiconv-2.dll} to
C:\WINDOWS\system32 and
C:\cygwin\bin\{ar.exe,as.exe,dlltool.exe,gcc.exe,ranlib.exe} to
C:\Dev\OCaml\bin


      reply	other threads:[~2007-10-23  7:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20071015080212.A2DD5BC73@yquem.inria.fr>
2007-10-22 22:10 ` William Smith
2007-10-23  7:38   ` David Allsopp [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='036201c81547$aeed55b0$017ca8c0@countertenor' \
    --to=dra-news@metastack.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).