Reinstalled ocaml on windows after a long pause, trying to recompile an old project of mine (2011), the project is about music so I wrote a simple library to use midi and sounds playback capabilities of the mmsystem of windows. At now something is changed with the OCAMLC compiler and it says “Don’t know what to do with winmm.lib”.
I used:
ocamlc -a -custom -o mmlib.cma -ccopt “-I"%CAML_LD_LIBRARY_PATH%"” winmm.lib camlmidi.lib mmlib.cmo
to compile my library. With an old version of OCAML (3.1 maybe) it worked.
I tried also the ocamlopt version of it:
ocamlopt -a -o mmlib.cmxa winmm.lib camlmidi.lib mmlib.ml
I think that the problem was that I was trying with the mingw toolchain, cause the 5.2 was the installed version, after running the system-msvc installation command (opam install system-MSVC) opam downgraded my version to 4.1.2 and now it’s all right (at a first glance).
Hoping in a 5.3 MSVC compatibility I’preparing to the upgrade
You should be able to try 5.3’s MSVC support now, as long as your switch is explicit about the version - opam install ocaml.5.3.0 system-msvc should give you the current beta release (installing just system-msvc in the “default” opam switch created by opam init will have downgraded the compiler to the last released version of OCaml with MSVC support, which is indeed 4.14.2)