Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: OCaml on Windows help
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Allsopp <dra-news@m...>
Subject: RE: [Caml-list] Re: OCaml on Windows help
> 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