Sorry I wasn't being precise. The error is code independent, I tested ocamlopt on a "helloworld program". I am not using cygwin because I am trying to produce binaries which do not require cygwin to launch and I understand that there is a particular dll that is required to execute cygwin based compilation (correct?). I am using ocaml-3.11.0-win-msvc.exe that I downloaded from the web site (the gui and byte code generator work just fine). Stuff I did (probably wrongly): - install ocaml-3.11 using the installer - install MinGW Shell - MASM32 editor (for ml.exe) - flexdll (for flexlib) - and microsoft SDK (for uuid.lib) The result is a code that compiles just fine until the linking step where I get this weird error. These steps I got from an old thread (2004) here: http://groups.google.com/group/fa.caml/browse_thread/thread/fddaa68b3f497ec2 I was not able to find more recent instructions. On Sun, Feb 20, 2011 at 11:13 PM, David Allsopp wrote: > Jean Krivine wrote: > > > I am trying to produce windows native code for windows, to do so I > > have followed the instructions I found on different sources I am almost > > done but I get one last error during linking: > > Which sources? > > > ** Fatal error: cannot find file "OLDNAMES" > > > > File "caml_startup", Line 1, character 0-1 > > > > Error: Error during linking > > What command have you run to get this error? > > > I am using windows 7 and MinGW + Windows SDK 6.2 (to get uuid.lib) > > + masm32 (to have ml.exe) > > Are you compiling OCaml from sources or using a pre-packaged version (and > if so, which version of OCaml and which port). It's odd that you're > referring to Windows 7 + MinGW - if you're building for the MS toolchain, > then you should be using Cygwin but I wonder if that's just that you've > called it by the wrong name (equally, I've got a feeling that building with > MSYS now works, but I think that compiling under Cygwin is still the > "official" method). > > I haven't done an MS toolchain build of OCaml for a while, but I'm > reasonably sure that when I last used it, the Windows Server 2008 SDK > contains both the 32 and 64 bit assembler (no need to download masm > separately any more for 32 bit builds). > > > David