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 Old DkML Documentation Site .

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

Try the “Installing the OCaml Plugin” on the same Old DkML Documentation Site page.


If you have further issues with the Windows installer, can you put them on https://gitlab.com/diskuv/diskuv-ocaml/-/issues ?

1 Like