From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id AE891BBD8 for ; Tue, 2 Aug 2005 14:38:23 +0200 (CEST) Received: from mailhost.mis.mpg.de (mailhost.mis.mpg.de [194.95.184.44]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j72CcNAM000525 for ; Tue, 2 Aug 2005 14:38:23 +0200 Received: from huygens.mis.mpg.de (huygens.mis.mpg.de [194.95.184.58]) by mailhost.mis.mpg.de (8.9.3/8.8.6) with ESMTP id OAA19618; Tue, 2 Aug 2005 14:38:14 +0200 (MEST) Received: from [194.95.184.58] (huygens.mis.mpg.de [194.95.184.58]) by huygens.mis.mpg.de (8.9.3/8.9.3) with ESMTP id OAA20698; Tue, 2 Aug 2005 14:38:15 +0200 (MEST) Message-ID: <42EF6937.6020807@tobias-elze.de> Date: Tue, 02 Aug 2005 14:38:15 +0200 From: Tobias Elze User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: ocamlsdl natively for Windows? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Miltered: at concorde with ID 42EF693F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; tobias:01 ocamlsdl:01 mingw:01 howto:01 ocamlsdl:01 mingw:01 lablgl:01 unpack:01 usr:01 usr:01 -mno-cygwin:01 flags:01 bug:01 ...:98 ...:98 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 I succeeded in compiling them with MingW. Special thanks to Sami Mäkelä for his invaluable help and suggestions! In order to spare others hours of annoying work I provide a mini Howto here: How to compile ocamlsdl for MingW ================================= 1) Download the following archives: a) ocamlsdl (http://ocamlsdl.sourceforge.net/download.html). (e.g. ocamlsdl-0.7.2.zip) b) SDL for MingW (precompiled: http://www.libsdl.org/release/SDL-devel-1.2.8-mingw32.tar.gz) c) SDL image (source: http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.4.zip, the precompiled version for VC6 works for MingW as well: http://www.libsdl.org/projects/SDL_image/release/SDL_image-devel-1.2.4-VC6.zip) d) SDL ttf (source: http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.7.zip, precompiled: http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-devel-2.0.7-VC6.zip) e) SDL mixer (http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.6.zip. precompiled: http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-devel-1.2.6-VC6.zip) (If you need GL support, you may want to download lablgl as well. It has to be installed before compiling ocamlsdl!) 2) Install SDL a) SDL main package If you downloaded the compiled version for MingW (see above) then unpack it to your Cygwin home directory. - go to cygwin/usr/include/Sdl, edit the file "SDL_main.h", and remove the line "#define main ...". - look for a file named "i386-mingw32msvc-sdl-config" in your /bin directory and rename it to "sdl-config". - edit this file, - change the prefix to "/usr", - remove all references to SDL_main and SDLmain - add "-mno-cygwin" to "--cflags)" - remove all "-lmingw32" flags b) SDL image, SDL ttf, SDL mixer - If you use the precompiled packages, just unarchive. I put the *.h files into the directory where SDL.h was located and the libraries into the directory where the SDL libraries were. 3) Install ocamlsdl - just ./configure, make, make install -- that's all! (However, there is no visible standard output of the generated binaries -- I don't know if it's a bug or a feature;) ...)