Having installed OCaml on Windows 7, 64 bit (self-installer), I tried to create a simple exe file with
ocamlopt HelloWorld.ml -o HelloWorld
As required I used the native-code compiler (ocamlopt) with Visual C++ (I have Visual Studio 10 installed) and the Microsoft Assembler MASM version 8 (MinGW is also installed); I have also set the path variables for OCaml (c:\ProgramFiles\Ocaml\bin), MinGW (c:\ProgramFiles\MinGW\bin) and MASM (C:\masm32\bin). However, despite my best efforts and much searching I cannot get around the error message
**Fatal error, Cannot find file "crt2.o"
File "caml_startup", line 1, characters 0-1:
Error: error during linking.
except when I place the HelloWorld.ml file in the lib folder of MinGW, where the crt2.o file is located. I appreciate the answer may be straightforward, but I am stuck. Any help would be greatly appreciated.