Trouble with a Diskuv OCaml installation (Windows)

I have just installed Diskuv OCaml on Windows, but a dune build on a simple project displays multiple errors.

After putting the Visual Studio Build.Tools in the path (needed for ml64.exe), a ‘dune build’ command gives me the error :

** Fatal error: Cannot find file “advapi32.lib”

I don’t know how to add this lib in a library path.

Also, in VSCode, my OCaml extension can’t find my opam switches.

Did you try using the wrapper command with-dkml in front of your command (ie with-dkml dune build ...? cc @jbeckford

Cheers,
Nicolas

@Frederic_Loyer Yes, with-dkml dune build ..., with-dkml opam install ..., etc. will adjust your PATH and other environment variables so Visual Studio Build Tools can be used. Using the x64 Native Tools Command Prompt for VS 2019 should also work. Both are described at Beyond Basics — Diskuv OCaml documentation .

Also, in VSCode, my OCaml extension can’t find my opam switches.

Try the “Installing the OCaml Plugin” on the same Beyond Basics — Diskuv OCaml documentation page.


If you have further issues with the Windows installer, can you put them on Issues · diskuv / Diskuv OCaml · GitLab ?

1 Like