# \#windows

**URL:** https://discuss.ocaml.org/tag/windows/76.md

[Latest](https://discuss.ocaml.org/latest.md) · [Categories](https://discuss.ocaml.org/categories.md) · [Tags](https://discuss.ocaml.org/tags.md)

---

## [How to run cygwin shell on Windows?](https://discuss.ocaml.org/t/how-to-run-cygwin-shell-on-windows/17290)

<div class="topic-metadata">

**Author:** [@Tim](https://discuss.ocaml.org/u/Tim)\
**Replies:** 10\
**Last updated:** [June 22, 2026, 2:37pm UTC](https://discuss.ocaml.org/t/how-to-run-cygwin-shell-on-windows/17290 "2026-06-22T14:37:55Z")

</div>

OCaml 5 seems to sort of support Windows, vaguely. As far as I can see it uses an internal cygwin environment so it’s still keeping Windows at arms length. Presumably that is because so many packages assume Unix. I’m tr…

---

## [Configuring company to not complete keywords](https://discuss.ocaml.org/t/configuring-company-to-not-complete-keywords/17961)

<div class="topic-metadata">

**Author:** [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Replies:** 5\
**Last updated:** [April 10, 2026, 1:19pm UTC](https://discuss.ocaml.org/t/configuring-company-to-not-complete-keywords/17961 "2026-04-10T13:19:49Z")

</div>

My highschool labs have Emacs+Tuareg+Utop+Merlin+Company under Windows, and the completion has a annoying behaviour with keywords : it pops up a completion menu, but since it does not list keyword that is being typed, va…

---

## [UTop crashes (after Windows upgrade ?)](https://discuss.ocaml.org/t/utop-crashes-after-windows-upgrade/17966)

<div class="topic-metadata">

**Author:** [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Replies:** 3\
**Last updated:** [April 9, 2026, 9:25pm UTC](https://discuss.ocaml.org/t/utop-crashes-after-windows-upgrade/17966 "2026-04-09T21:25:30Z")

</div>

I am not an actual Windows user but I am trying to configure an opam/ocaml/utop environment under Windows 11. I am experiencing the following : when starting utop in PowerShell, it immediately crashes with exit code -10…

---

## [Installing OCaml on a Windows dev drive](https://discuss.ocaml.org/t/installing-ocaml-on-a-windows-dev-drive/17904)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 1\
**Last updated:** [March 18, 2026, 9:36pm UTC](https://discuss.ocaml.org/t/installing-ocaml-on-a-windows-dev-drive/17904 "2026-03-18T21:36:59Z")

</div>

Is there a way to install OCaml on a Windows dev drive? I mean, by default OCaml installs itself on C:\\Users, and from what I read, a dev drive needs to be configured as D:, E:, etc. I didn’t see a way to mount a subfol…

---

## [OCaml and Windows: is it normal for development to be (much) slower?](https://discuss.ocaml.org/t/ocaml-and-windows-is-it-normal-for-development-to-be-much-slower/17846)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 11\
**Last updated:** [March 3, 2026, 3:42pm UTC](https://discuss.ocaml.org/t/ocaml-and-windows-is-it-normal-for-development-to-be-much-slower/17846 "2026-03-03T15:42:05Z")

</div>

I’m trying to do some tests with OCaml on Windows, using a virtual machine, but the tooling performance is abysmal: a single opam update takes 6 minutes; dune build sometimes spends more than a minute seemingly doing not…

---

## [\[ANN\] NotInriaCaml\_Std.Wenv@0.1.0 - create Windows envs on macOS \[dk0\]](https://discuss.ocaml.org/t/ann-notinriacaml-std-wenv-0-1-0-create-windows-envs-on-macos-dk0/17858)

<div class="topic-metadata">

**Author:** [@jbeckford](https://discuss.ocaml.org/u/jbeckford)\
**Replies:** 0\
**Last updated:** [February 27, 2026, 8:04pm UTC](https://discuss.ocaml.org/t/ann-notinriacaml-std-wenv-0-1-0-create-windows-envs-on-macos-dk0/17858 "2026-02-27T20:04:45Z")

</div>

It is my pleasure to announce the following package for the dk0 build system that creates a Windows environment (“wenv”) containing OCaml using a custom Wine build for macOS: NotInriaCaml\_Std.Wenv@0.1.0 Here is a samp…

---

## [Help with Windows-related errors](https://discuss.ocaml.org/t/help-with-windows-related-errors/17828)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 3\
**Last updated:** [February 20, 2026, 6:35pm UTC](https://discuss.ocaml.org/t/help-with-windows-related-errors/17828 "2026-02-20T18:35:02Z")

</div>

Hello, I’m trying to install the caisar opam package on Windows (using a default install with mingw, on a PowerShell, on Windows 11 after using winget to install opam). The first issue I had, was the dependency ocaml-p…

---

## [Dune portable replacement for 'grep' / 'sed'](https://discuss.ocaml.org/t/dune-portable-replacement-for-grep-sed/17815)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 8\
**Last updated:** [February 18, 2026, 7:50am UTC](https://discuss.ocaml.org/t/dune-portable-replacement-for-grep-sed/17815 "2026-02-18T07:50:41Z")

</div>

I just realized that this dune action fails on Windows, where grep and sed are not available by default: (rule (targets version.ml) (deps foo.opam) (action (system "grep ^version foo.opam | sed -e 's/version:/let …

---

## [OCaml Windows Working Group](https://discuss.ocaml.org/t/ocaml-windows-working-group/14755)

<div class="topic-metadata">

**Author:** [@sudha](https://discuss.ocaml.org/u/sudha)\
**Replies:** 8\
**Last updated:** [January 6, 2026, 7:09pm UTC](https://discuss.ocaml.org/t/ocaml-windows-working-group/14755 "2026-01-06T19:09:27Z")

</div>

Hi all, I’m happy to share that we’re starting a working group for OCaml Windows. This is part of a larger effort, First-class Windows, to enhance the OCaml experience on Windows. Through this effort, we aim to coordina…

---

## [MSYS2 and ocaml-lsp-server](https://discuss.ocaml.org/t/msys2-and-ocaml-lsp-server/17624)

<div class="topic-metadata">

**Author:** [@ComanderP](https://discuss.ocaml.org/u/ComanderP)\
**Replies:** 3\
**Last updated:** [December 22, 2025, 3:36pm UTC](https://discuss.ocaml.org/t/msys2-and-ocaml-lsp-server/17624 "2025-12-22T15:36:17Z")

</div>

Hi everyone, I reinstalled opam on Windows to try out the MSYS2 mode (instead of the Cygwin one), and well I think it was mostly going well, until I tried to instal ocaml-lsp-server. Being a new fresh installation, the …

---

## [When following install instructions for windows topkg and ocp-indent fail to compile](https://discuss.ocaml.org/t/when-following-install-instructions-for-windows-topkg-and-ocp-indent-fail-to-compile/17514)

<div class="topic-metadata">

**Author:** [@W\_F](https://discuss.ocaml.org/u/W_F)\
**Replies:** 15\
**Last updated:** [December 3, 2025, 4:53pm UTC](https://discuss.ocaml.org/t/when-following-install-instructions-for-windows-topkg-and-ocp-indent-fail-to-compile/17514 "2025-12-03T16:53:03Z")

</div>

Hello, I’ve been trying to follow the installation instructions at Installing OCaml · OCaml Documentation using MinGW through MSYS2, and almost everything compiles except topkg and ocp-indent. the log when I try to insta…

---

## [\[ANN\] Sunsetting of DkML distribution](https://discuss.ocaml.org/t/ann-sunsetting-of-dkml-distribution/17530)

<div class="topic-metadata">

**Author:** [@jbeckford](https://discuss.ocaml.org/u/jbeckford)\
**Replies:** 0\
**Last updated:** [November 26, 2025, 3:42pm UTC](https://discuss.ocaml.org/t/ann-sunsetting-of-dkml-distribution/17530 "2025-11-26T15:42:13Z")

</div>

DkML, the Windows-friendly distribution of OCaml, is being sunset. DkML was launched to get Windows + OCaml off life-support when an earlier Windows distribution was retired. Mission accomplished. And thanks to OCSF for …

---

## [How to link statically with libgmp on Windows?](https://discuss.ocaml.org/t/how-to-link-statically-with-libgmp-on-windows/17409)

<div class="topic-metadata">

**Author:** [@Tim](https://discuss.ocaml.org/u/Tim)\
**Replies:** 9\
**Last updated:** [October 23, 2025, 10:18am UTC](https://discuss.ocaml.org/t/how-to-link-statically-with-libgmp-on-windows/17409 "2025-10-23T10:18:21Z")

</div>

I’m building an OCaml project with Dune on Windows and the resulting .exe depends on libgmp-10.dll which I eventually found (turns out Windows doesn’t have anything like ldd but you can instead just do where libgmp-10.dl…

---

## [Porting my Toy OCaml Build System to Windows](https://discuss.ocaml.org/t/porting-my-toy-ocaml-build-system-to-windows/17185)

<div class="topic-metadata">

**Author:** [@gridbugs](https://discuss.ocaml.org/u/gridbugs)\
**Replies:** 0\
**Last updated:** [August 29, 2025, 8:39am UTC](https://discuss.ocaml.org/t/porting-my-toy-ocaml-build-system-to-windows/17185 "2025-08-29T08:39:02Z")

</div>

---

## [Cygwin linking error for ocaml called from C example](https://discuss.ocaml.org/t/cygwin-linking-error-for-ocaml-called-from-c-example/16974)

<div class="topic-metadata">

**Author:** [@frusak](https://discuss.ocaml.org/u/frusak)\
**Replies:** 2\
**Last updated:** [July 15, 2025, 3:11pm UTC](https://discuss.ocaml.org/t/cygwin-linking-error-for-ocaml-called-from-c-example/16974 "2025-07-15T15:11:48Z")

</div>

Hello and may your day be nice. TLDR; could not compile (link) example from ocaml manual for embedding ocaml into c program. (no ctypes) My setup: opam with default cygwin configuration and ocaml 5.3 on Windows 10. So…

---

## [Opam & git strategy for repos with symlinks on Windows](https://discuss.ocaml.org/t/opam-git-strategy-for-repos-with-symlinks-on-windows/16815)

<div class="topic-metadata">

**Author:** [@NAlec](https://discuss.ocaml.org/u/NAlec)\
**Replies:** 4\
**Last updated:** [June 14, 2025, 7:38pm UTC](https://discuss.ocaml.org/t/opam-git-strategy-for-repos-with-symlinks-on-windows/16815 "2025-06-14T19:38:16Z")

</div>

Hello Daniel, I had to add : opam pin add odoc-parser –dev-repo opam pin add odoc –dev-repo opam pin add odig –dev-repo (not the “repo” instead of “reop” below, but I assume it was a typo) Nevertheless odig still…

---

## [Compiling 5.3.0 fails on Windows 11](https://discuss.ocaml.org/t/compiling-5-3-0-fails-on-windows-11/16794)

<div class="topic-metadata">

**Author:** [@ysalmon](https://discuss.ocaml.org/u/ysalmon)\
**Replies:** 4\
**Last updated:** [June 12, 2025, 12:23pm UTC](https://discuss.ocaml.org/t/compiling-5-3-0-fails-on-windows-11/16794 "2025-06-12T12:23:36Z")

</div>

I am trying to setup opam and OCaml on a fresh Windows 11 machine. Installing Git and opam per se with winget worked, as well as opam init --root="C:\\Opam" --bare with the offered internal Cygwin system. However, opam -…

---

## [Path separators on Windows](https://discuss.ocaml.org/t/path-separators-on-windows/16755)

<div class="topic-metadata">

**Author:** [@dra27](https://discuss.ocaml.org/u/dra27)\
**Replies:** 6\
**Last updated:** [June 3, 2025, 6:13pm UTC](https://discuss.ocaml.org/t/path-separators-on-windows/16755 "2025-06-03T18:13:28Z")

</div>

This is not entirely true, and not just being pedantic. “Windows” always recognises back-slash as the separator and sometimes recognises forward-slashes. The sometimes can bite in such unexpected ways that I tend to thi…

---

## [Sound on OCaml on Windows](https://discuss.ocaml.org/t/sound-on-ocaml-on-windows/16746)

<div class="topic-metadata">

**Author:** [@gridbugs](https://discuss.ocaml.org/u/gridbugs)\
**Replies:** 0\
**Last updated:** [June 2, 2025, 5:30am UTC](https://discuss.ocaml.org/t/sound-on-ocaml-on-windows/16746 "2025-06-02T05:30:55Z")

</div>

---

## [Cannot install dune using opam on Window due to non-exist directory/file?](https://discuss.ocaml.org/t/cannot-install-dune-using-opam-on-window-due-to-non-exist-directory-file/16388)

<div class="topic-metadata">

**Author:** [@Minh\_Le](https://discuss.ocaml.org/u/Minh_Le)\
**Replies:** 5\
**Last updated:** [March 29, 2025, 3:29pm UTC](https://discuss.ocaml.org/t/cannot-install-dune-using-opam-on-window-due-to-non-exist-directory-file/16388 "2025-03-29T15:29:56Z")

</div>

Hi everyone, I am trying to install dune by using opam on Powershell terminal on Window 11. I have this error, and don’t know how to solve it: opam upgrade dune dune is not installed. Install it? \[y/n\] y The following a…

---

## [Huh, wonder if this is an OCaml Windows bug](https://discuss.ocaml.org/t/huh-wonder-if-this-is-an-ocaml-windows-bug/16383)

<div class="topic-metadata">

**Author:** [@Chet\_Murthy](https://discuss.ocaml.org/u/Chet_Murthy)\
**Replies:** 5\
**Last updated:** [March 28, 2025, 6:34pm UTC](https://discuss.ocaml.org/t/huh-wonder-if-this-is-an-ocaml-windows-bug/16383 "2025-03-28T18:34:51Z")

</div>

(1) I have a program, BOING.ml, that uses Unix.system to invoke another program, “foobar.ml” (compied/copied to “yadda…” (with varous sufixes). (2) When yadda.ml is compiled to “yadda.exe”, it works fine. (3) When yadd…

---

## [Does Windows OCaml (5.3) \`Unix.execvp\` not properly pass along the exit-code?](https://discuss.ocaml.org/t/does-windows-ocaml-5-3-unix-execvp-not-properly-pass-along-the-exit-code/16362)

<div class="topic-metadata">

**Author:** [@Chet\_Murthy](https://discuss.ocaml.org/u/Chet_Murthy)\
**Replies:** 4\
**Last updated:** [March 24, 2025, 10:19am UTC](https://discuss.ocaml.org/t/does-windows-ocaml-5-3-unix-execvp-not-properly-pass-along-the-exit-code/16362 "2025-03-24T10:19:20Z")

</div>

In the long night of porting Camlp5 to Windows, I’ve encountered a couple of pretty weird and deep bugs. The first, I have a pretty clean repro for, though it needs to be cleaned-up a little more to submit a bugreport. …

---

## ["dunelongcmd" Linking Error on Windows using ocamlopt](https://discuss.ocaml.org/t/dunelongcmd-linking-error-on-windows-using-ocamlopt/15469)

<div class="topic-metadata">

**Author:** [@b-valdez](https://discuss.ocaml.org/u/b-valdez)\
**Replies:** 5\
**Last updated:** [February 23, 2025, 3:40pm UTC](https://discuss.ocaml.org/t/dunelongcmd-linking-error-on-windows-using-ocamlopt/15469 "2025-02-23T15:40:07Z")

</div>

Hello everyone, Because Opam now supports Windows I have experimented with moving my Ocaml-Workspaces from WSL into Windows proper. This was successful and on my laptop there was a noticeable improvement to the startup …

---

## [Tuareg/Merlin on Cygwin](https://discuss.ocaml.org/t/tuareg-merlin-on-cygwin/15362)

<div class="topic-metadata">

**Author:** [@Frederic\_Loyer](https://discuss.ocaml.org/u/Frederic_Loyer)\
**Replies:** 3\
**Last updated:** [January 3, 2025, 11:55am UTC](https://discuss.ocaml.org/t/tuareg-merlin-on-cygwin/15362 "2025-01-03T11:55:32Z")

</div>

I have made Tuareg/Merlin work on Cygwin, and the Opam 2.2.1. I am using the emacs from Cygwin… then I had to adapt the usual .emacs/init.el: Note: I won’t be able to autoload tuareg/merlin. This explain the load functi…

---

## [Unix sockets on Windows and Node.js](https://discuss.ocaml.org/t/unix-sockets-on-windows-and-node-js/15775)

<div class="topic-metadata">

**Author:** [@amaro](https://discuss.ocaml.org/u/amaro)\
**Replies:** 1\
**Last updated:** [December 11, 2024, 6:30am UTC](https://discuss.ocaml.org/t/unix-sockets-on-windows-and-node-js/15775 "2024-12-11T06:30:33Z")

</div>

I have a Node.js application using Unix sockets which works on Linux, but I’m trying to make it work on Windows. My socket has a name similar to C:\\PathTo\\socket.sock. The following code seems to work: let addr = "C:\\\\…

---

## ["Error: Cannot find file '-lws2\_32'" while compiling OCaml with OPAM on Windows](https://discuss.ocaml.org/t/error-cannot-find-file-lws2-32-while-compiling-ocaml-with-opam-on-windows/15726)

<div class="topic-metadata">

**Author:** [@oAxel](https://discuss.ocaml.org/u/oAxel)\
**Replies:** 8\
**Last updated:** [December 4, 2024, 10:07pm UTC](https://discuss.ocaml.org/t/error-cannot-find-file-lws2-32-while-compiling-ocaml-with-opam-on-windows/15726 "2024-12-04T22:07:03Z")

</div>

Hello! Newbie here interested in learning OCaml. When trying to do the setup for Windows as described here OCaml on Windows · OCaml Documentation, I get this error: \[ERROR\] The compilation of ocaml-base-compiler.5.2.1 f…

---

## [Opam on windows: \`opam install cairo2\` fails with \`"pkg-config": command not found\`](https://discuss.ocaml.org/t/opam-on-windows-opam-install-cairo2-fails-with-pkg-config-command-not-found/15676)

<div class="topic-metadata">

**Author:** [@lyxia](https://discuss.ocaml.org/u/lyxia)\
**Replies:** 0\
**Last updated:** [November 27, 2024, 2:05pm UTC](https://discuss.ocaml.org/t/opam-on-windows-opam-install-cairo2-fails-with-pkg-config-command-not-found/15676 "2024-11-27T14:05:39Z")

</div>

I’m trying Opam on windows following these instructions. I got a switch set up with a compiler successfully built. But when building packages, I’m now stuck on installing conf-cairo. The blog mentions similar-looking is…

---

## [OCAMLC error on library linking with windows library and c primitives library](https://discuss.ocaml.org/t/ocamlc-error-on-library-linking-with-windows-library-and-c-primitives-library/15596)

<div class="topic-metadata">

**Author:** [@Wile](https://discuss.ocaml.org/u/Wile)\
**Replies:** 2\
**Last updated:** [November 17, 2024, 8:46pm UTC](https://discuss.ocaml.org/t/ocamlc-error-on-library-linking-with-windows-library-and-c-primitives-library/15596 "2024-11-17T20:46:40Z")

</div>

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 w…

---

## [Windows installers that don't need network access](https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564)

<div class="topic-metadata">

**Author:** [@yallop](https://discuss.ocaml.org/u/yallop)\
**Replies:** 4\
**Last updated:** [November 6, 2024, 6:57pm UTC](https://discuss.ocaml.org/t/windows-installers-that-dont-need-network-access/15564 "2024-11-06T18:57:28Z")

</div>

Are there any OCaml installers for Windows that can run in an environment without network access?

---

## [Wildcard expansion on Windows](https://discuss.ocaml.org/t/wildcard-expansion-on-windows/15461)

<div class="topic-metadata">

**Author:** [@bsu](https://discuss.ocaml.org/u/bsu)\
**Replies:** 3\
**Last updated:** [October 17, 2024, 1:31pm UTC](https://discuss.ocaml.org/t/wildcard-expansion-on-windows/15461 "2024-10-17T13:31:14Z")

</div>

While implementing a small CLI tool, I ran into a somehow undocumented feature of the Ocaml compiler: it automatically expands wildcards before doing anything else. Which proved to be a problem. This post serves three d…

[Next page](https://discuss.ocaml.org/tag/windows/76.md?match_all_tags=true&page=1&tags%5B%5D=windows)
